src.utils.convert_rustworkx¶
Utility functions for converting rustworkx graphs to networkx and pygraphviz graphs.
Functions
|
Convert a rustworkx PyGraph or PyDiGraph to a networkx graph. |
- src.utils.convert_rustworkx.to_networkx(graph)[source]¶
Convert a rustworkx PyGraph or PyDiGraph to a networkx graph.
- Parameters:
graph (
PyGraph
|PyDiGraph
) – The rustworkx graph to convert.- Raises:
TypeError – If the graph is not a rustworkx PyGraph or PyDiGraph.
- Return type:
Graph
|DiGraph
|MultiGraph
|MultiDiGraph
- Returns:
The networkx graph.