cascade.graph.map_edges

cascade.graph.map_edges(graph, edge_attr='weight', fn=lambda x: ...)[source]

Map edge attribute by a function

Parameters:
  • graph (TypeVar(SimpleGraph, Graph, DiGraph)) – Graph to be mapped

  • edge_attr (str) – Edge attribute to be mapped

  • fn (Callable) – Mapping function

Return type:

TypeVar(SimpleGraph, Graph, DiGraph)

Returns:

Mapped graph