Skip to content

Multiple edges should give repeated columns in the incidence matrix #21

@scheinerman

Description

@scheinerman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions