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
- Host: GitHub
- URL: https://github.com/andros21/pgrank
- Owner: andros21
- License: gpl-3.0
- Created: 2021-07-20T06:43:22.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-23T09:40:18.000Z (2 months ago)
- Last Synced: 2025-03-23T10:27:29.301Z (2 months ago)
- Topics: armadillo, cpp, cytoscapejs, doxygen, gh-pages, meson, ninja-build, popperjs, scrapy, tippyjs
- Language: C++
- Homepage: https://andros21.github.io/pgrank
- Size: 670 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## 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`