Structural Preferential Attachment Simulation
Table of Contents
- Quick Start
- Compilation 1. Using CMake 2. Using GCC
- Growth at the Level of Communities
- Growth Within Communities
- Hierarchical Growth
This is a C++ implementation of the stochastic growth process dubbed Structural Preferential Attachment (SPA). See our official website for more informations.
spa_networks uses features from C++11 and must therefore be compiled with
clang-3.7 (or a newer version).
Compiling with cmake should be straightforward:
cmake . make
The available options for
OPTMEM_MODE favors a small memory footprint over speed.
HPC_MODE silences all output and compiles assertions out.
The options can be passed to the usual GUI or through the command line interface:
cmake -DOPTMEM_MODE=ON . make
The build has been tested with
cmake-3.4, on OSx and GNU/Linux, with
The explicit compilation call below should work on most *nix systems
g++ -o3 -W -Wall -Wextra -pedantic -std=c++0x spa_main.cpp modular_structure.cpp spa_network.cpp subgraph.cpp spa_algorithm.cpp interface.cpp output_functions.cpp misc_functions.cpp includes/logger.cpp -lboost_program_options -o SPA
Compilations options can be manually adjusted in the src/config.h file.
Multiple parameters must be set for each simulation of the SPA process. These parameters can be passed through a configuration file
./spa_networks -c path/to/config/file.txt
./spa_networks -g generates an empty configuration file template.
boost::program_options is installed and properly linked to the binary, parameters will also be accepted directly from the command line. See
for more information about each flags.
The results of a simulation can be found in the directory from which
spa_networks is called.
This default behavior can be modified with the
-B / --base_path= flag (by specifying a new absolute or relative path).
Note that outputs are not computed unless specifically requested.
So, for example, there won't be an edge list file, unless the user specifies a file name for the edge_list. e.g.
More information about the SPA process can be found in the following papers.
Growth at the Level of Communities:
- Structural preferential attachment: Network organization beyond the link
- Structural preferential attachment: Stochastic process for the growth of scale-free, modular and self-similar systems