Graph operations
Disjoint union
MolecularGraph.Graph.disjointunion!
— Methoddisjointunion!(g1::T, g2::T, G::T...) where {T<:OrderedGraph} -> T
Generate disjoint union graph of given graphs. g1
will be overwritten by the union graph. Unlike non-destructive disjointunion
, g1
does not retain any information about other given graphs but a bit faster.
MolecularGraph.Graph.disjointunion
— Methoddisjointunion(g1::UndirectedGraph, g2::UndirectedGraph,
G::UndirectedGraph...) -> DisjointUnionGraph
Generate disjoint union graph of given graphs. The new graph with type DisjointUnionGraph
retains mapping to the original graphs as nodes and edges attributes.
Line graph
MolecularGraph.Graph.linegraph
— Methodlinegraph(G::AbstractGraph) -> LineGraph
Generate line graph.
Product of graphs
MolecularGraph.Graph.cartesianproduct
— Methodcartesianproduct(G::OrderedGraph, H::OrderedGraph) -> CartesianProduct
Return the cartesian product of graphs G and H.
MolecularGraph.Graph.modularproduct
— Methodmodularproduct(G::OrderedGraph, H::OrderedGraph) -> ModularProduct
Return the modular product of graphs G and H.