girgs  1.0.2
Generator for Geometric Inhomogeneous Random Graphs
Namespaces | Functions
Generator.h File Reference
#include <vector>
#include <string>
#include <girgs/girgs_api.h>
Include dependency graph for Generator.h:

Go to the source code of this file.

Namespaces

 girgs
 

Functions

GIRGS_API std::vector< double > girgs::generateWeights (int n, double ple, int weightSeed, bool parallel=true)
 The weights are sampled according to a power law distribution between [1, n) More...
 
GIRGS_API std::vector< std::vector< double > > girgs::generatePositions (int n, int dimension, int positionSeed, bool parallel=true)
 Samples d dimensional coordinates for n points on a torus \([0,1)^d\). More...
 
GIRGS_API double girgs::scaleWeights (std::vector< double > &weights, double desiredAvgDegree, int dimension, double alpha)
 Scales all weights so that the expected average degree equals desiredAvgDegree. Implemented as binary search over an estimation function. More...
 
GIRGS_API std::vector< std::pair< int, int > > girgs::generateEdges (const std::vector< double > &weights, const std::vector< std::vector< double >> &positions, double alpha, int samplingSeed)
 Samples edges according to weights and positions. An edge between node u and v is formed with probability \( \left(\frac{w_u w_v / W}{|| x_u - x_v ||^d}\right)^\alpha \) or 1.0 if the term exceeds 1.0. More...
 
GIRGS_API void girgs::saveDot (const std::vector< double > &weights, const std::vector< std::vector< double >> &positions, const std::vector< std::pair< int, int >> &graph, const std::string &file)
 Saves the graph in .dot format (graphviz). The weight is saved as a label and the coordinates as a position attribute for each Node. More...