NetworkXToolkit
_get_nx
init
- timeout (Optional[float]): The timeout value for API requests in seconds. If None, no timeout is applied. (default: :obj:
None
)
add_node
- node_id (str): The ID of the node.
- attributes (dict): Additional node attributes.
add_edge
- source (str): Source node ID.
- target (str): Target node ID.
- attributes (dict): Additional edge attributes.
get_nodes
get_edges
get_shortest_path
- method (
Literal['dijkstra', 'bellman-ford'], optional
): Algorithm to compute the path. Ignored if weight is None. (default: :obj:'dijkstra'
)
compute_centrality
serialize_graph
deserialize_graph
- data (str): The JSON string representing the graph.
export_to_file
- file_path (str): The file path to save the graph.
import_from_file
- file_path (str): The file path to load the graph from.