diff --git a/src/graph_representations/hypergraph.jl b/src/graph_representations/hypergraph.jl index 78741f26..850c1b08 100644 --- a/src/graph_representations/hypergraph.jl +++ b/src/graph_representations/hypergraph.jl @@ -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 = length(hypergraph.hyperedge_map) + return SparseArrays.sparse(I, J, V, m, n) end """