graph_theory_suite
Perform graph theory analyses including shortest path, centrality, community detection, and more. Accepts edge lists or adjacency matrices.
Instructions
Brief description: Professional graph theory analysis tool, supporting shortest path, maximum flow, connectivity analysis, centrality calculation, community detection, spectral analysis, and other comprehensive graph theory functions.
Examples:
graph_theory_suite(operation='shortest_path', edge_list=[[1,2], [2,3], [1,3]], source_node=1, target_node=3)
graph_theory_suite(operation='centrality_analysis', graph_data={'nodes': [1,2,3], 'edges': [[1,2], [2,3]]})
graph_theory_suite(operation='graph_visualization', adjacency_matrix=[[0,1,1],[1,0,1],[1,1,0]], filename='graph_plot')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Graph theory operation type. Supports: 'shortest_path', 'all_pairs_shortest_path', 'maximum_flow', 'connectivity_analysis', 'centrality_analysis', 'community_detection', 'spectral_analysis', 'graph_properties', 'minimum_spanning_tree', 'graph_coloring', 'clique_analysis', 'graph_visualization', 'graph_comparison', 'graph_generation' | |
| graph_data | No | Graph data dictionary. Format: {'nodes': [list of nodes], 'edges': [list of edges]} | |
| adjacency_matrix | No | Adjacency matrix. Square matrix, elements represent connection weights between nodes | |
| edge_list | No | Edge list. Format: [[source_node, target_node], ...] or with weights | |
| node_list | No | Node list. Used to specify node identifiers | |
| source_node | No | Source node for algorithms like shortest path | |
| target_node | No | Target node for algorithms like shortest path | |
| weight_attribute | No | Weight attribute name for weighted graph algorithms | weight |
| directed | No | Whether it is a directed graph | |
| algorithm | No | Algorithm type. E.g., 'dijkstra', 'bellman_ford' for shortest path | auto |
| k_value | No | K value for K-means clustering, K-core analysis | |
| threshold | No | Threshold value for filtering edges or nodes | |
| layout | No | Graph layout algorithm. Supports: 'spring', 'circular', 'random' | spring |
| filename | No | Save filename without path | |
| node_colors | No | List of node colors for visualization | |
| edge_colors | No | List of edge colors for visualization | |
| node_sizes | No | List of node sizes for visualization | |
| show_labels | No | Whether to show node labels in visualization | |
| figsize | No | Figure size for visualization |