Skip to content

Commit

Permalink
added dimensions for incidence_matrix function
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cole committed Dec 12, 2023
1 parent 42f3242 commit acebcf4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/graph_representations/hypergraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ function LightGraphs.incidence_matrix(hypergraph::HyperGraph)
end
end
V = Int.(ones(length(I)))
return SparseArrays.sparse(I, J, V)
m = length(hypergraph.vertices)
n = m
return SparseArrays.sparse(I, J, V, m, n)
end

"""
Expand Down

0 comments on commit acebcf4

Please sign in to comment.