![]() |
fpmas 1.6
|
#include <graph_builder.h>
Public Member Functions | |
virtual std::vector< api::graph::DistributedNode< T > * > | build (DistributedNodeBuilder< T > &node_builder, LayerId layer, DistributedGraph< T > &graph)=0 |
Distributed version of the GraphBuilder.
Contrary to the local version, the DistributedGraphBuilder is assumed to build a graph using a distributed algorithm, to improve performance and scalability.
T | graph datatype |
|
pure virtual |
Automatically builds the specified graph according to the current implementation.
Nodes are generated using the specified DistributedNodeBuilder. More precisely, DistributedNodeBuilder::localNodeCount() nodes will be inserted in the graph. Generated nodes can then be linked on the specified layer, according to rules defined by the implemented algorithm.
Notice that the specified graph is not required to be empty.
Contrary to the GraphBuilder, this process is synchronous and should be called from all processes.
node_builder | DistributedNodeBuilder instance used to generate nodes |
layer | layer on which nodes will be linked |
graph | graph in which nodes and edges will be inserted |
Implemented in fpmas::graph::DistributedClusteredGraphBuilder< T >, fpmas::graph::RingGraphBuilder< T >, fpmas::graph::SmallWorldGraphBuilder< T >, and fpmas::graph::DistributedUniformGraphBuilder< T >.