Skip to content
 
 

Latest commit

 

History

115 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BaseGraph: A portable graph library

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.

Why another graph library?

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.

Requirements

  • 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

Installation

Clone this repository

git clone https://github.com/antoineallard/base_graph.git

C++

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.

Python wrapper

After cloning the repository, execute

pip install .

Testing

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages