When a Multigraph has multiple edges, the incidence matrix should have repeated, identical columns. That is, there should be as many columns as there are edges.
julia> using Graphs, Multigraphs
julia> g = Multigraph(4)
{4, 0} undirected Int64 multigraph
julia> add_edge!(g,1,2)
true
julia> add_edge!(g,1,2)
true
julia> add_edge!(g,1,3)
true
julia> incidence_matrix(g,oriented=true)
4×2 SparseArrays.SparseMatrixCSC{Int64, Int64} with 4 stored entries:
-1 -1
1 ⋅
⋅ 1
⋅ ⋅
This matrix should have three columns with the first column repeated.
When a
Multigraphhas multiple edges, the incidence matrix should have repeated, identical columns. That is, there should be as many columns as there are edges.This matrix should have three columns with the first column repeated.