WrappedMultiGraphs.jl
A simplistic julia package implementing multi graphs. This package aims to be fully compliant with Graphs.jl.
Implementation
Since the code needed is extremely similar to Graphs.SimpleGraphs we wrap a SimpleGraph
type in a MultiGraph
type.
Otherwise extreme code repetition is needed.
Instead we use composition and forward useful functions.
Use graph()
to access the underlying wrapped graph.
Attentions: we also wrap getproperty
, so the dot syntax returns fields of the wrapped struct.
Basically, this package kills this if statement and deals with the repercussions.
The function edges()
will return AbstractEdge
that will repeat if there are multiple edges.
Similar packages and differences
- Multigraphs.jl
- uses
Dict
instead ofVector
to enumerate nodes and connections. - defines a new Edge type
MultipleEdge