pgrank  0.1.6
cpp app for computing pagerank
pgrank Documentation


Logo

Meson CI Coverage Releaser CD
Version License

cpp app for computing pagerank

Installation

Prerequisites

Platform requirements

Linux x86_64

Compiler requirements

A C++ compiler (e.g. g++-9) supporting the C++2a or C++20 standard

Build system requirements

Meson build system version and Ninja (its dependency)

Also CMake (to build subprojects) and pkgconfig (to search library dependencies) are needed

If Meson is not available on your system, it can be installed with pip or conda

Dependencies

pgrank requires the following packages to be installed on the system:

  • armadillo - a high quality linear algebra library (matrix maths) C++-native
  • OpenBLAS - linked with armadillo, multi-threading on intensive tasks
  • rapidJSON - a fast JSON parser and generator for C++
  • argparse - argument parser for modern C++

argparse (header only library), if not available on your system, is automatically built and installed as subprojects with the Meson build system, so in this sense are "optional" because provided by Meson itself

Meson build system

To compile and install pgrank, run:

meson setup \
--buildtype=release \
--prefix=/install/path build
cd build/
meson compile
meson install

Where build is the build directory. Specifying the installation prefix with --prefix is optional. On Debian-based systems (e.g. Ubuntu) one may want to use --libdir=lib, otherwise libraries will be installed in $PREFIX/lib/<archdir> where <archdir> is e.g. x86_64-linux-gnu

For developers

For testing purpose (developers only) working inside a conda env is probably the best way to build and use this project. Additional dependencies:

  • catch2 - a modern, C++-native, header-only, test framework for unit-tests
  • gcovr - extensions of GCOV, for code coverage

catch2 (header only library), if not available on your system, are automatically built and installed as subprojects with the Meson build system, so in this sense are "optional" because provided by Meson itself

To compile, and test pgrank, run:

meson setup -Dtest=true -Db_coverage=true build
cd build/
meson compile
meson test -v
ninja coverage

The target coverage will try to create code coverage report in all three formats text xml html (coverage-html needs lcov to be generated). Optionaly only one coverage format can be triggered (e.g coverage-text)

Usage

You need a special formatted json as input to create the graph (see json2mat.hpp header for more informations or inside caibg). And stop, all other parameters can be set using cli pgrank --help