6 #include <girgs/girgs_api.h>
26 GIRGS_API std::vector<double>
generateWeights(
int n,
double ple,
int weightSeed,
bool parallel =
true);
42 GIRGS_API std::vector<std::vector<double>>
generatePositions(
int n,
int dimension,
int positionSeed,
bool parallel =
true);
68 GIRGS_API
double scaleWeights(std::vector<double>& weights,
double desiredAvgDegree,
int dimension,
double alpha);
87 GIRGS_API std::vector<std::pair<int,int>>
generateEdges(
const std::vector<double>& weights,
const std::vector<std::vector<double>>& positions,
88 double alpha,
int samplingSeed);
105 GIRGS_API
void saveDot(
const std::vector<double>& weights,
const std::vector<std::vector<double>>& positions,
106 const std::vector<std::pair<int,int>> &graph,
const std::string &file);
Definition: Generator.h:9
GIRGS_API std::vector< double > generateWeights(int n, double ple, int weightSeed, bool parallel=true)
The weights are sampled according to a power law distribution between [1, n)
GIRGS_API std::vector< std::vector< double > > generatePositions(int n, int dimension, int positionSeed, bool parallel=true)
Samples d dimensional coordinates for n points on a torus .
GIRGS_API std::vector< std::pair< int, int > > 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 probabi...
GIRGS_API double 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...
GIRGS_API void 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 po...