nctx - Networks in ConTeXt¶
The package nctx provides functionality to analyze attributed networks. Unique feature of this package is the ability to enforce contextual constraints via user-defined functions during shortest path discovery and centrality calculation. For a basic example, see here.
The source code is accessible on github.
Installation¶
Usually, Python packages can be installed using the pip package manager downloading a package from a repository as part of the installation process. Since nctx is a C++ library wrapped for Python, the package can’t be distributed via a repository as it needs to be compiled on your computer. The pip package manager does not provide this functionality. Therefore, you first need to compile the package and install it using pip afterwards.
Compiling the nctx package for Python3 requires an installation of:
- a C++17 compiler (GCC) version 7 and above)
- Boost (min. v. 1.65.0)
- CMake
- scikit-build
Under Ubuntu, these requirements can be installed using
sudo apt install libboost1.71-dev cmake build-essential
pip3 install scikit-build
Note that this simply installs all available Boost libraries. Strictly required are libboost-graph-dev and libboost-python-dev.
Then, in the root of the source directory, call
python3 setup.py bdist_wheel
to produce a whl-file (a Python-wheel). This whl-file is found under the dist/-subfolder and can then be installed with
pip3 install dist/nctx-*.whl
Citation¶
If you use the nctx package, please cite the corresponding tech report:
Mirco Schoenfeld. nctx - Networks in ConTeXt. University of Bayreuth, 2021.
You might use the following BibTeX entry: