fpmas 1.6
Public Member Functions | List of all members
fpmas::graph::DistributedUniformGraphBuilder< T > Class Template Reference

#include <uniform_graph_builder.h>

Inheritance diagram for fpmas::graph::DistributedUniformGraphBuilder< T >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::graph::DistributedUniformGraphBuilder< T >:
Collaboration graph
[legend]

Public Member Functions

template<typename EdgeDist >
 DistributedUniformGraphBuilder (random::DistributedGenerator<> &generator, EdgeDist &distribution)
 
template<typename EdgeDist >
 DistributedUniformGraphBuilder (EdgeDist &distribution)
 
std::vector< api::graph::DistributedNode< T > * > build (api::graph::DistributedNodeBuilder< T > &node_builder, api::graph::LayerId layer, api::graph::DistributedGraph< T > &graph) override
 
virtual std::vector< api::graph::DistributedNode< T > * > build (DistributedNodeBuilder< T > &node_builder, LayerId layer, DistributedGraph< T > &graph)=0
 

Detailed Description

template<typename T>
class fpmas::graph::DistributedUniformGraphBuilder< T >

Distributed version of the UniformGraphBuilder.

The DistributedUniformGraphBuilder should generally be used, since it has been proved to achieve much better performances.

Constructor & Destructor Documentation

◆ DistributedUniformGraphBuilder() [1/2]

template<typename T >
template<typename EdgeDist >
fpmas::graph::DistributedUniformGraphBuilder< T >::DistributedUniformGraphBuilder ( random::DistributedGenerator<> &  generator,
EdgeDist &  distribution 
)
inline

DistributedUniformGraphBuilder constructor.

Template Parameters
EdgeDistedge count distribution (must satisfy RandomNumberDistribution)
Parameters
generatorrandom number generator provided to the distribution
distributionrandom distribution that manages edges generation. See build()

◆ DistributedUniformGraphBuilder() [2/2]

template<typename T >
template<typename EdgeDist >
fpmas::graph::DistributedUniformGraphBuilder< T >::DistributedUniformGraphBuilder ( EdgeDist &  distribution)
inline

DistributedUniformGraphBuilder constructor.

The RandomGraphBuilder::distributed_rd random generator is used. It can be seeded with RandomGraphBuilder::seed() or fpmas::seed().

Template Parameters
EdgeDistedge count distribution (must satisfy RandomNumberDistribution)
Parameters
distributionrandom distribution that manages edges generation. See build()

Member Function Documentation

◆ build()

template<typename T >
std::vector< api::graph::DistributedNode< T > * > fpmas::graph::DistributedUniformGraphBuilder< T >::build ( api::graph::DistributedNodeBuilder< T > &  node_builder,
api::graph::LayerId  layer,
api::graph::DistributedGraph< T > &  graph 
)
overridevirtual

Same as UniformGraphBuilder::build(), but distributed and much more efficient.

This process is synchronous and should be called from all processes.

Parameters
node_builderDistributedNodeBuilder instance used to generate nodes
layerlayer on which nodes will be linked
graphgraph in which nodes and edges will be inserted
Returns
built nodes

Implements fpmas::api::graph::DistributedGraphBuilder< T >.


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