@@ -647,9 +647,9 @@ function StarSetBicoloringResult(
647647 pos_Bc += 1
648648 A_indices[pos_Bc] = k
649649 compressed_indices[pos_Bc] = (symmetric_to_column[c] - 1 ) * m + i
650- else # i == h
651- # i is the hub and j is the spoke
652- c = symmetric_color[i]
650+ else # i + n == h
651+ # (i + n) is the hub and j is the spoke
652+ c = symmetric_color[i + n ]
653653
654654 # A[i, j] = Br[symmetric_to_row[c], j]
655655 pos_Br -= 1
@@ -752,26 +752,23 @@ function TreeSetBicoloringResult(
752752
753753 for pos in first: last
754754 (leaf, neighbor) = reverse_bfs_orders[pos]
755- index += 1
756-
757755 i = leaf
758756 j = neighbor
759- col_i = view (rv, nzrange (S, i))
760- col_j = view (rv, nzrange (S, j))
757+ index += 1
761758
762759 # ! format: off
763760 # S[i,j] is in the lower triangular part of S
764761 if in_triangle (i, j, :L )
765762 # S[i,j] is stored at index_ij = (S.colptr[j] + offset) in S.nzval
766763 col_j = view (rv, nzrange (S, j))
767- offset = searchsortedfirst (col_j, i):: Int - 1
764+ offset = searchsortedfirst (col_j, i- n ):: Int - 1
768765 A_indices[index] = S. colptr[j] + offset
769766
770767 # S[i,j] is in the upper triangular part of S
771768 else
772769 # S[j,i] is stored at index_ji = (S.colptr[i] + offset) in S.nzval
773770 col_i = view (rv, nzrange (S, i))
774- offset = searchsortedfirst (col_i, j):: Int - 1
771+ offset = searchsortedfirst (col_i, j- n ):: Int - 1
775772 A_indices[index] = S. colptr[i] + offset
776773 end
777774 # ! format: on
0 commit comments