BaseGraph provides a set of C++ objects and scripts to analyze, manipulate and simulate the structure of graphs (or complex networks).
Most of the core functionalities of the C++ library are available as a Python module. Objects and functions are wrapped using pybind11.
The development of this library was motivated by the need of a fast, lightweight and customizable code, which was easy to install and straightforward to deploy on supercomputing facilities whose softwares are not always up-to-date.
At the beginning of this project, none of the existing high-quality libraries such as graph-tool, NetworkX or igraph fulfilled the aforementionned requirements.
I therefore decided to start writing my own code, adding new features following the needs of my research. This is a work in progress; comments, suggestions, contributions and bug reports are welcomed.
- A C++11 (or newer) compliant compiler
- CMake 3.17+ for the C++ library
- Python 3.X for the Python module
- pybind11 for the Python module
Clone this repository
git clone https://github.com/antoineallard/base_graph.git
To compile the static library, execute
mkdir build && cd build && cmake .. && make && cd ..The static library will appear as build/src/libBaseGraph.a (the extension will vary depending on the operating system).
To link the library in another CMake project, use
include_directories(/path/to/the/repository/include)
...
target_link_libraries(<TARGET> /path/to/the/repository/build/src/libBaseGraph.a)A small example is provided in the example directory.
After cloning the repository, execute
pip install .In order to build the unit tests, the option BUILD_TESTS must be toggled on
cmake -DBUILD_TESTS=on ..
The option is saved in the CMake cache so it only needs to be set once.
The GoogleTest framework is used to manage the unit tests. GoogleTest does not need to be installed because it is automatically pulled from GitHub by the CMake build.