cascade.graph.multiplex

cascade.graph.multiplex(*graphs, edge_attr='weight', na_fill=0.0)[source]

Combine multiple graphs into a single graph by multiplexing an edge attribute

Parameters:
  • *graphs (TypeVar(SimpleGraph, Graph, DiGraph)) – Graphs to be multiplexed

  • edge_attr (str) – Edge attribute to be multiplexed

  • na_fill (Any) – Value to fill in when an edge is not found in certain graphs

Return type:

TypeVar(SimpleGraph, Graph, DiGraph)

Returns:

Multiplexed graph

Note

All attributes except edge_attr will be dropped, because it is generally not obvious how attributes of nodes and edges missing in certain multiplexed graphs should be filled.