fpmas 1.6
Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
fpmas::graph::RandomGraphBuilder Class Reference

#include <random_graph_builder.h>

Inheritance diagram for fpmas::graph::RandomGraphBuilder:
Inheritance graph
[legend]
Collaboration diagram for fpmas::graph::RandomGraphBuilder:
Collaboration graph
[legend]

Static Public Member Functions

static void seed (random::mt19937_64::result_type seed)
 

Static Public Attributes

static random::DistributedGenerator distributed_rd
 
static random::mt19937_64 rd
 

Protected Member Functions

template<typename Generator_t , typename EdgeDist >
 RandomGraphBuilder (Generator_t &generator, EdgeDist &edge_distribution)
 

Protected Attributes

std::function< std::size_t()> num_edge
 

Detailed Description

A base class that can be used for graph builders based on a random number of outgoing edges for each node, according to the specified random distribution.

Static random generators are also available, so that the graph generation process can be controlled with fpmas::seed().

Constructor & Destructor Documentation

◆ RandomGraphBuilder()

template<typename Generator_t , typename EdgeDist >
fpmas::graph::RandomGraphBuilder::RandomGraphBuilder ( Generator_t &  generator,
EdgeDist &  edge_distribution 
)
inlineprotected

RandomGraphBuilder constructor.

Template Parameters
Generator_trandom generator type (must satisfy UniformRandomBitGenerator)
EdgeDistedge count distribution (must satisfy RandomNumberDistribution)
Parameters
generatorrandom generator
edge_distributionoutgoing edge count distribution

Member Function Documentation

◆ seed()

void fpmas::graph::RandomGraphBuilder::seed ( random::mt19937_64::result_type  seed)
static

Seeds the distributed_rd and rd random generators.

Parameters
seedrandom seed

Member Data Documentation

◆ num_edge

std::function<std::size_t()> fpmas::graph::RandomGraphBuilder::num_edge
protected

Function object returning a random edge count.

◆ distributed_rd

random::DistributedGenerator fpmas::graph::RandomGraphBuilder::distributed_rd
static

Static and distributed random generator.

◆ rd

random::mt19937_64 fpmas::graph::RandomGraphBuilder::rd
static

Static random generator, that should produce the same random number generation sequences on all processes, provided that the seed() method is properly called with the same argument on all processes (or not called at all, to use the default seed).


The documentation for this class was generated from the following files: