NetworKit is a toolbox for high-performance network analysis
Project description
NetworKit is an open-source tool suite for high-performance network analysis. Its aim is to provide tools for the analysis of large networks in the size range from thousands to billions of edges. For this purpose, it implements efficient graph algorithms, many of them parallel to utilize multicore architectures. These are meant to compute standard measures of network analysis. NetworKit is focused on scalability and comprehensiveness. NetworKit is also a testbed for algorithm engineering and contains novel algorithms from recently published research (see list of publications below).
NetworKit is a Python module. High-performance algorithms are written in C++ and exposed to Python via the Cython toolchain. Python in turn gives us the ability to work interactively and a rich environment of tools for data analysis and scientific computing. Furthermore, NetworKit's core can be built and used as a native library if needed.
Requirements
You will need the following software to install NetworKit as a python package:
- A modern C++ compiler, e.g.: g++ (>= 8.1), clang++ (>= 6.0) or MSVC (>= 14.20)
- OpenMP for parallelism (usually ships with the compiler)
- Python3 (3.8 or higher is supported)
- Development libraries for Python3. The package name depends on your distribution. Examples:
- Debian/Ubuntu:
apt-get install python3-dev
- RHEL/CentOS:
dnf install python3-devel
- Windows: Use the official release installer from www.python.org
- Debian/Ubuntu:
- Development libraries for Python3. The package name depends on your distribution. Examples:
- Pip
- CMake version 3.6 or higher (Advised to use system packages if available. Alternative:
pip3 install cmake
) - Build system: Make or Ninja
- Cython version 0.29 or higher (e.g.,
pip3 install cython
)
Install
In order to use NetworKit, you can either install it via package managers or build the Python module from source.
Install via package manager
While the most recent version is in general available for all package managers, the number of older downloadable versions differ.
pip
pip3 install [--user] networkit
conda (channel conda-forge)
conda config --add channels conda-forge
conda install networkit [-c conda-forge]
brew
brew install networkit
spack
spack install py-networkit
More system-specific information on how to install NetworKit on Linux, macOS (both Intel and M1) and Windows-systems can be found here.
Building the Python module from source
git clone https://github.com/networkit/networkit networkit
cd networkit
python3 setup.py build_ext [-jX]
pip3 install -e .
The script will call cmake
and ninja
(make
as fallback) to compile
NetworKit as a library, build the extensions and copy it to the top folder. By
default, NetworKit will be built with the amount of available cores in
optimized mode. It is possible the add the option -jN
the number of threads
used for compilation.
Usage example
To get an overview and learn about NetworKit's different functions/classes, have a look at our interactive notebooks-section, especially the Networkit UserGuide. Note: To view and edit the computed output from the notebooks, it is recommended to use Jupyter Notebook. This requires the prior installation of NetworKit. You should really check that out before start working on your network analysis.
We also provide a Binder-instance of our notebooks. To access this service, you can either click on the badge at the top or follow this link. Disclaimer: Due to rebuilds of the underlying image, it can takes some time until your Binder instance is ready for usage.
If you only want to see in short how NetworKit is used - the following example provides a climpse at that. Here we generate a random hyperbolic graph with 100k nodes and compute its communities with the PLM method:
>>> import networkit as nk
>>> g = nk.generators.HyperbolicGenerator(1e5).generate()
>>> communities = nk.community.detectCommunities(g, inspect=True)
PLM(balanced,pc,turbo) detected communities in 0.14577102661132812 [s]
solution properties:
------------------- -----------
# communities 4536
min community size 1
max community size 2790
avg. community size 22.0459
modularity 0.987243
------------------- -----------
Install the C++ Core only
In case you only want to work with NetworKit's C++ core, you can either install it via package managers or build it from source.
Install C++ core via package manager
conda (channel conda-forge)
conda config --add channels conda-forge
conda install libnetworkit [-c conda-forge]
brew
brew install libnetworkit
spack
spack install libnetworkit
Building the C++ core from source
We recommend CMake and your preferred build system for building the C++ part of NetworKit.
The following description shows how to use CMake in order to build the C++ Core only:
First you have to create and change to a build directory: (in this case named build
)
mkdir build
cd build
Then call CMake to generate files for the make
build system, specifying the directory of the root CMakeLists.txt
file (e.g., ..
). After this make
is called to start the build process:
cmake ..
make -jX
To speed up the compilation with make a multi-core machine, you can append -jX
where X denotes the number of threads to compile with.
Use NetworKit as a library
This paragraph explains how to use the NetworKit core C++ library in case it has been built from source. For how to use it when installed via package managers, best refer to the official documentation (brew, conda, spack).
In order to use the previous compiled networkit library, you need to have it installed, and link
it while compiling your project. Use these instructions to compile and install NetworKit in /usr/local
:
cmake ..
make -jX install
Once NetworKit has been installed, you can use include directives in your C++-application as follows:
#include <networkit/graph/Graph.hpp>
You can compile your source as follows:
g++ my_file.cpp -lnetworkit
Unit tests
Building and running NetworKit unit tests is not mandatory.
However, as a developer you might want to write and run unit tests for your
code, or if you experience any issues with NetworKit, you might want to check
if NetworKit runs properly.
The unit tests can only be run from a clone or copy of the repository and not
from a pip installation. In order to run the unit tests, you need to compile
them first. This is done by setting the CMake NETWORKI_BUILD_TESTS
flag to
ON
:
cmake -DNETWORKIT_BUILD_TESTS=ON ..
Unit tests are implemented using GTest macros such as TEST_F(CentralityGTest, testBetweennessCentrality)
.
Single tests can be executed with:
./networkit_tests --gtest_filter=CentralityGTest.testBetweennessCentrality
Additionally, one can specify the level of the logs outputs by adding --loglevel <log_level>
;
supported log levels are: TRACE
, DEBUG
, INFO
, WARN
, ERROR
, and FATAL
.
Compiling with address/leak sanitizers
Sanitizers are great tools to debug your code. NetworKit provides additional Cmake flags
to enable address, leak, and undefined behavior sanitizers.
To compile your code with sanitizers, set the CMake
NETWORKIT_WITH_SANITIZERS
to either address
or leak
:
cmake -DNETWORKIT_WITH_SANITIZERS=leak ..
By setting this flag to address
, your code will be compiled with the address
and the undefined
sanitizers.
Setting it to leak
also adds the leak
sanitizer.
Documentation
The most recent version of the documentation can be found online.
Contact
For questions regarding NetworKit, have a look at our issues-section and see if there is already an open discussion. If not feel free to open a new issue. To stay updated about this project, subscribe to our mailing list.
Contributions
We encourage contributions to the NetworKit source code. See the development guide for instructions. For support please contact the mailing list.
Credits
List of contributors can be found on the NetworKit website credits page.
External Code
The program source includes:
License
The source code of this program is released under the MIT License. We ask you to cite us if you use this code in your project (c.f. the publications section below and especially the technical report). Feedback is also welcome.
Publications
The NetworKit publications page lists the publications on NetworKit as a toolkit, on algorithms available in NetworKit, and simply using NetworKit. We ask you to cite the appropriate ones if you found NetworKit useful for your own research.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file networkit-11.0.tar.gz
.
File metadata
- Download URL: networkit-11.0.tar.gz
- Upload date:
- Size: 6.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c446eb8873b3a5f8d12d75c55eb2d58c2d34bec3d53411302a217000f8778d57 |
|
MD5 | a44fb683eeb5e4ff18f00c435d54ce68 |
|
BLAKE2b-256 | f66ae691594d52ceeb2e82d73b1601205dabef7f3b2209bd559f6ba88553c180 |
File details
Details for the file networkit-11.0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: networkit-11.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 26.9 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a740a25501b37ff342176d63a942bec43af1c34b3d44ed534ac64bbaccd3ed9 |
|
MD5 | 93520a7d5a7ca566fe3f70652a34e858 |
|
BLAKE2b-256 | b7ad2f2cd46f7adf99b2d3a0e2396c5f6dcdb3c613bd4527066e01895e30164f |
File details
Details for the file networkit-11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: networkit-11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbf8835360b0259830116ca4223e6477afdd026ea319df043667f51efc14fb25 |
|
MD5 | bb3dc1d93dbc4b437cb6ecf5258e5036 |
|
BLAKE2b-256 | 52a10f88b76584c9ac641830c3507a870ff971db120b81fe2935875dc02ef998 |
File details
Details for the file networkit-11.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: networkit-11.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 13.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45ec03540b0d7b4f8e888362c1e098d095600c11e15d10a72be042f9cab893cb |
|
MD5 | 8431a1b60d97e428c27d72253c8b3957 |
|
BLAKE2b-256 | 89c68d4e5cf64ffe64fdc1743796ad64610820b6a6384fc61d4676021e289227 |
File details
Details for the file networkit-11.0-cp312-cp312-macosx_14_0_arm64.whl
.
File metadata
- Download URL: networkit-11.0-cp312-cp312-macosx_14_0_arm64.whl
- Upload date:
- Size: 10.6 MB
- Tags: CPython 3.12, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a42fbaca6d87dd43a5ea04256fec9cd4c588c86298c5161ae4d2d45db0760ee8 |
|
MD5 | ff6bd0098510fb257203c1d16838eb74 |
|
BLAKE2b-256 | 1a4dbaab94b2866176dc0a50bd4f398d50ff41a24fc6fa24939c0bf7504d97db |
File details
Details for the file networkit-11.0-cp312-cp312-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: networkit-11.0-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 11.0 MB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 765f8684d5d2471ca046eedf88b146b7137c107a2d0b8de0ca9122b9ce1e7601 |
|
MD5 | 32de886808b96fc8534e46116ad52327 |
|
BLAKE2b-256 | dc5df35f018876411de7967dba99166f2da81e7399ae2354a5ea75ae61fdf2bb |
File details
Details for the file networkit-11.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: networkit-11.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 26.9 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc4c436833a351388b9b74a157243994fbdb02e1fc094322146791e098787866 |
|
MD5 | d6780d8508b23b06979ed6f637f23134 |
|
BLAKE2b-256 | 27c8c7654ab9f9dcacae369610662fdf3660e4ab71e328bf62d14eeba0f51bc6 |
File details
Details for the file networkit-11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: networkit-11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bc668b38162edf623c638feb8ff546334f4df0509ef2e24bf35967f5e66f300 |
|
MD5 | 63c00096da719b56a7b6bcbc36706384 |
|
BLAKE2b-256 | 8b7d7da07b8b898b25a83bd91064ffceaa9fa0d7cb3d20c374c14fa431fb257d |
File details
Details for the file networkit-11.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: networkit-11.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 13.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 413cb0e00ab6ecab885240c623d16efae1374d5265603a4343308bf89f397865 |
|
MD5 | fbbb642da5b898f28a38a2d8e3f50015 |
|
BLAKE2b-256 | 6ef7c911f2aa4c31a3a9acb104691b4ebcd9f06857e4bc2b8330100af886deeb |
File details
Details for the file networkit-11.0-cp311-cp311-macosx_14_0_arm64.whl
.
File metadata
- Download URL: networkit-11.0-cp311-cp311-macosx_14_0_arm64.whl
- Upload date:
- Size: 10.6 MB
- Tags: CPython 3.11, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98dc84ad7994bded825ec027f8f3d35677151f3894abcd9326754c0c8ed2e086 |
|
MD5 | 3da8ae5aa4d85c4121dcc2840bda2d99 |
|
BLAKE2b-256 | 614c040c75112956e5fb506794fd9dd0b9880eaf6d7a699e0934cff8ac15114f |
File details
Details for the file networkit-11.0-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: networkit-11.0-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 11.0 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db6cb4c3f47b786202316c69f49c53b3d530c89a1557d17ca826cc69204b7ad2 |
|
MD5 | d99f179beb1d02c1f5d613a23479d1e5 |
|
BLAKE2b-256 | fb45ced2a55925439c1c5e4396bff730800bebbd38f10794d3d9f60e6c8f2b70 |
File details
Details for the file networkit-11.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: networkit-11.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 26.9 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eaa5141fdda5e567dfe24b91b38bbc226ae15197e456c035ba9664872c3f450 |
|
MD5 | 0af77ce0d4257f0543a59ab6f63519f7 |
|
BLAKE2b-256 | 45f6df74cab1b0062f3d92443be5250ce5de3a7291fe67c5a8d41f361373b3e2 |
File details
Details for the file networkit-11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: networkit-11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 592fef1106b9a2300aaf471a4034264ea99329c5e8359d3283e91b81c541baaf |
|
MD5 | 3d32f9429318755c494aec5ed1ea3374 |
|
BLAKE2b-256 | b3c8462a9c48825ef70a0b08aa08f4d450a1c2d9e48e4bebdabc8a9121bd5a16 |
File details
Details for the file networkit-11.0-cp310-cp310-macosx_14_0_arm64.whl
.
File metadata
- Download URL: networkit-11.0-cp310-cp310-macosx_14_0_arm64.whl
- Upload date:
- Size: 10.5 MB
- Tags: CPython 3.10, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff726a3807cac85fff3b902033e13eb807dedd4ebbb239c94877624a43d2bd8f |
|
MD5 | 6bfcf835993bf513a8d052b38fc8baca |
|
BLAKE2b-256 | 88b4a93b49d52e25091fe3d075430d326c75c6cdf357d54579f32b16bf94ad9e |
File details
Details for the file networkit-11.0-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: networkit-11.0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 10.9 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7647e6639264f61dec8c33a054e167f53f308fd59a12dab4aded241f75299f7 |
|
MD5 | 6a99b60de94f7d070315b589e3f7a6ce |
|
BLAKE2b-256 | d22e89ed9d51aec2f2ba94a36a4a519b53afb20f62fea89f56becad086deb02d |
File details
Details for the file networkit-11.0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: networkit-11.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 26.9 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7151dbc436463217626e7c4d0a674ad87d35e265266f918d3c0c168c8496dd3e |
|
MD5 | 1b8ae83f23bba728030e1fb90c6b7a0e |
|
BLAKE2b-256 | 82feb4703e1534a0332f102474618ba1a1c6b09b922f88f3597abf2317f24125 |
File details
Details for the file networkit-11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: networkit-11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8076e9ba4378b44ddf6960f15755711aa0a9aa604ecd9de4e114e7a0e21e00c2 |
|
MD5 | b60641e3e030f575d7e8a1cde90fdb08 |
|
BLAKE2b-256 | 14042729a1844536ef3a5148e129682d5c7d42f1261cf3f592ddde1792a50daa |
File details
Details for the file networkit-11.0-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: networkit-11.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 26.9 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d0303bccff5b1aadde9d3747b9740c0213ebb82cb71cffbfec8e1ec05bb9c65 |
|
MD5 | 7b613a8f2a249ac2d19093bcdc9a923f |
|
BLAKE2b-256 | cd3228b703a1a46723bd675dd318fb26b94cd5f9342abbba2f4edbc3987307c3 |
File details
Details for the file networkit-11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: networkit-11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20aca22ee614a2b393f6c48052d2a8ac6ce98898c0ac80d7b467f2ecd91540a6 |
|
MD5 | 24d984d3a82ef4f13715b03e581a07a1 |
|
BLAKE2b-256 | d45877799f651dd9f59f2a64b94407df7dcbedfe785b4d802e33dc5edfc45001 |
File details
Details for the file networkit-11.0-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: networkit-11.0-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 11.0 MB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52d08991f01f5c4988ba12999857ec1105851499594fdb432f737cf5e36113bf |
|
MD5 | 0d6352fd5b14c10ef1a4564ee435406c |
|
BLAKE2b-256 | 341a265f41703b8a9bdd81edc2b8f999fb27e0a14e559cd1f1bc57bfce0525de |