Build communication graph data for use with `NetworkX `_. Args: graph: Communication graph to build data from. Normally created by :func:`comm_graph`. Returns: A tuple of two lists. The first list contains the edge data, where an e
(
graph: AdjacencyList,
)
| 183 | |
| 184 | |
| 185 | def comm_graph_data( |
| 186 | graph: AdjacencyList, |
| 187 | ) -> tuple[list[tuple[int, int, dict[str, int]]], list[tuple[int, dict[str, int]]]]: |
| 188 | """Build communication graph data for use with `NetworkX <https://networkx.org/>`_. |
| 189 | |
| 190 | Args: |
| 191 | graph: Communication graph to build data from. Normally created |
| 192 | by :func:`comm_graph`. |
| 193 | |
| 194 | Returns: |
| 195 | A tuple of two lists. The first list contains the edge data, |
| 196 | where an edge is a `(nodeID_0, nodeID_1, dict)` tuple, where |
| 197 | `dict` holds edge data. The second list hold node data, where a |
| 198 | node is a `(nodeID, dict)` tuple, where `dict` holds node data. |
| 199 | """ |
| 200 | return _cpp.graph.comm_graph_data(graph._cpp_object) |
| 201 | |
| 202 | |
| 203 | def comm_to_json(graph: AdjacencyList) -> str: |
nothing calls this directly
no outgoing calls
no test coverage detected