Code Monkey home page Code Monkey logo

a-portable-graph-library's Introduction

PGL: A portable graph library

PGL provides a set of C++ objects and Python scripts to analyze, manipulate and simulate the structure of graphs (or complex networks).

Except for a few exceptions, every objects provided by the PGL are written in standard C++. They are provided via self-contained header files making them easily integrable into any C++ project (can be included similarly to any header-only libraries such as Boost or the STL).

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 welcome.

Requirements

  • A C++11 (or newer) compliant compiler
  • Python 3.x

Installation

Clone this reporsitory using the --recurse-submodules option (see Git documentation), for example:

git clone --recurse-submodules https://github.com/antoineallard/a-portable-graph-library.git

and then

C++
  • copy the required header file (<sub-module>/src/<class object>.hpp) file in your project directory.
  • add #include <class object>.hpp to your C++ code
Python module
  • copy the required script file (<sub-module>/src/<script file>.hpp) file in your project directory.
  • add import <script file> to your Python script

Available sub-modules

There is no extensive documentation. However we provide several tutorials in the form of C++ codes and Jupyter notebooks to illustrate how to use the PGL. Codes validating several functionalities of the PGL provide additional examples and are located in most sub-module's validation/ sub-directory.

Structure of graphs

  • directed_graph: Provides functions to compute and extract various structural properties of simple unweighted directed graphs without self-loops.

Random graph generators

  • geometric_Sd_model: Generates random geometric graphs according to the S^D model.

  • l-cloning Generates an undirected edgelist using the L-cloning algorithm.

Percolation on graphs

  • percolation_on_graph: Provides functions to efficiently simulate bond percolation on simple unweighted undirected graphs without self-loops.

Input files

Most sub-modules of the PGL import graphs using an edgelist format (see each sub-module for details). A compatible edgelist file can be generated from NetworkX via

networkx.write_edgelist(your_graph_object, filename_of_edgelist, delimiter=' ', data=False)

a-portable-graph-library's People

Contributors

antoineallard avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.