Version 11/25/2021
This is the code repository for the paper "Deciphering the generating rules and functionalities of complex networks"
https://www.nature.com/articles/s41598-021-02203-4
├── Tutorial.ipynb // Quick Start Guide
├── NFD.py // Core Function Library
└── README.md
- Python 3.6 or higher (If you want to use Networkit, use python 3.7.x)
- Networkx
- Networkit (only for Linux and MacOS according to its official guide)
- tqdm
- scipy
Calculate the NFD value of the target node
G: (Networkx Graph) - Input graph
weight: (String) - Edge attribute of weight.
node: Label of the target node
[1] (double) - NFD value
[2] (double) - r value of linear regression
Calculate tau of unweighted network
G: (Networkx Graph) - Input graph
Q: (list) - Distortion exponents
[1] (numpy.array) - tau_list
Calculate tau of unweighted network using networkit package. Much faster but only available on Linux and MacOS
G: (Networkx Graph) - Input graph
Q: (list) - Distortion exponents
[1] (numpy.array) - tau_list
Calculate tau of unweighted network using python built-in Multiprocessing. Much faster but only available on Linux and MacOS
G: (Networkx Graph) - Input graph
Q: (list) - Distortion exponents
[1] (numpy.array) - tau_list
Calculate tau of weighted network
G: (Networkx Graph) - Input graph
Q: (list) - Distortion exponents
fdigi: (int) - Precision of path length
[1] (numpy.array) - tau_list
Calculate tau of weighted network using networkit package. Much faster but only available on Linux and MacOS
G: (Networkx Graph) - Input graph
Q: (list) - Distortion exponents
fdigi: (int) - Precision of path length
[1] (numpy.array) - tau_list
Calculate
tau_list: (list) - tau
q_list: (list) - Distortion exponents
name: (String) - Name of the network (for legend)
linewidth: (int) - line width in figure
[1] (numpy.array) -
[2] (numpy.array) -
[3] (double) - asymmetry
Calculate
tau_list: (list) - tau
q_list: (list) - Distortion exponents
name: (String) - Name of the network (for legend)
linewidth: (int) - line width in figure
[1] (numpy.array) -
[2] (numpy.array) - Distortion exponents
Calculate structure distance
ndim_list: (list) -
[1] (numpy.array) - N by N matrix of structure distance
Calculate specific heat
tau_list: (list) - tau
q_list: (list) - Distortion exponents
[1] (numpy.array) - Specific heat
[2] (numpy.array) - Distortion exponents