MultiLevelGraphs is a Python package based on NetworkX for creating and managing hierarchical structures of graphs obtained by gradual contractions of nodes and edges.
A Multi-level graph is a data structure useful for describing structural features of large and sparse directed graphs by identifying meaningful topological patterns, such as strongly connected components, circuits and cliques. It provides operations for building multi-level graphs from directed graphs, and for extracting and analyzing structural patterns at different levels of the hierarchy.
Before installing MultiLevelGraphs, ensure that you have the following prerequisites:
- Python 3.10 or higher
- pip (Python package installer)
You can install MultiLevelGraphs using pip. Open your terminal or command prompt and run the following command:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ multilevelgraphsTo verify that the library has been installed correctly, you can try importing it in a Python shell or script. Open your terminal or command prompt and enter:
from src import multilevelgraphs
print(multilevelgraphs.__version__)This should print the version number of MultiLevelGraphs if the installation was successful.
Documentation is available at the following link:
https://multilevel-graphs.readthedocs.io/en/latest/
MultiLevelGraphs has a dependency on NetworkX library. This should be installed automatically when you install MultiLevelGraphs using the command above.