Skip to main content

graph_compose

Function graph_compose 

Source
pub fn graph_compose(g1: &Graph, g2: &Graph) -> Graph
Expand description

Return the composition of two graphs.

The composition contains all nodes from both, and all edges from both (including parallel edges merged). This differs from union in that overlapping edges keep both attribute sets (G1 takes precedence). Matches networkx.compose(G, H).