Structural Preferential Attachment Simulation

Table of Contents
- About
- Quick Start
- Compilation
1. Using CMake
2. Using GCC
- Execution
- Output
- Papers
- Growth at the Level of Communities
- Growth Within Communities
- Hierarchical Growth
About:
This is a C++ implementation of the stochastic growth process dubbed Structural Preferential Attachment (SPA).
See our official website for more informations.
Quick Start
Compilation
spa_networks uses features from C++11 and must therefore be compiled with gcc-4.6 or clang-3.7 (or a newer version).
Using CMake
Compiling with cmake should be straightforward:
cmake .
make
The available options for cmake are
OPTMEM_MODE
HPC_MODE
FORCE_NO_BOOST
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-2.8 and cmake-3.4, on OSx and GNU/Linux, with gcc and clang.
Using GCC
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.
Execution
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
Note that ./spa_networks -g generates an empty configuration file template.
If boost::program_options is installed and properly linked to the binary, parameters will also be accepted directly from the command line. See
./spa_networks -h
for more information about each flags.
Output
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. --edge_list=TestEdgeList.txt.
Papers:
More information about the SPA process can be found in the following papers.
Growth at the Level of Communities:
Growth Within Communities:
Hierarchical Growth:
评论