Multigraphs.jl
Multigraphs.jl copied to clipboard
Package documentation.
Anyone working on documenting this package? This will be really helpful.
Thanks for the issue. Currently, there is no full documentation for this package. Only some instructions are available in README. Because APIs of Graphs.jl
are used in Multigraphs.jl
, you can also check docstrings for certain functions in Julia help mode. For example:
julia> using Graphs, Multigraphs
help?> add_edge!
search: add_edge! add_edge_checked!
add_edge!(g, e)
Add an edge e to graph g. Return true if edge was added successfully,
otherwise return false.
Examples
≡≡≡≡≡≡≡≡≡≡
julia> using Graphs
julia> g = SimpleGraph(2);
julia> add_edge!(g, 1, 2)
true
julia> add_edge!(g, 2, 3)
false
────────────────────────────────────────────────────────────────────────────
add_edge!(mg::AbstractMultigraph, s, d, mul)
Add a multiple edge from s to d multiplicity mul. If there is a multiple
edge from s to d, it will increase its multiplicity by mul.
Return true multiple edge was added successfully, otherwise return false.
Examples
==========
julia> using Graphs, Multigraphs
julia> mg = Multigraph(3);
julia> e = MultipleEdge(1, 2, 1);
julia> add_edge!(mg, e);
julia> ne(mg, true)
1
julia> add_edge!(mg, e);
julia> ne(mg, true)
2