An open API service indexing awesome lists of open source software.

https://github.com/andros21/pgrank

pgrank - cpp app for computing pagerank
https://github.com/andros21/pgrank

armadillo cpp cytoscapejs doxygen gh-pages meson ninja-build popperjs scrapy tippyjs

Last synced: about 2 months ago
JSON representation

pgrank - cpp app for computing pagerank

Awesome Lists containing this project

README

        







Logo







Meson CI


Coverage


Releaser CD




Version


License

cpp app for computing pagerank



Examples
·
Installation
·
Usage

## 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`](http://mesonbuild.com) 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`](http://arma.sourceforge.net) - a high quality linear algebra library (matrix maths) C++-native
- [`OpenBLAS`](https://github.com/xianyi/OpenBLAS) - linked with `armadillo`, multi-threading on intensive tasks
- [`rapidJSON`](https://github.com/Tencent/rapidjson/) - a fast JSON parser and generator for C++
- [`argparse`](https://github.com/p-ranav/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/` where `` 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`](https://github.com/catchorg/Catch2) - a modern, C++-native, header-only, test framework for unit-tests
- [`gcovr`](https://gcovr.com/en/stable/) - 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`](src/json2mat/json2mat.hpp) header for more informations or inside [`caibg`](examples/caibg)). And stop, all other parameters can be set using cli `pgrank --help`