fpmas 1.6
Public Member Functions | List of all members
fpmas::api::graph::DistributedGraphBuilder< T > Class Template Referenceabstract

#include <graph_builder.h>

Inheritance diagram for fpmas::api::graph::DistributedGraphBuilder< T >:
Inheritance graph
[legend]

Public Member Functions

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::api::graph::DistributedGraphBuilder< T >

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.

Template Parameters
Tgraph datatype

Member Function Documentation

◆ build()

template<typename T >
virtual std::vector< api::graph::DistributedNode< T > * > fpmas::api::graph::DistributedGraphBuilder< T >::build ( DistributedNodeBuilder< T > &  node_builder,
LayerId  layer,
DistributedGraph< T > &  graph 
)
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.

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

Implemented in fpmas::graph::DistributedClusteredGraphBuilder< T >, fpmas::graph::RingGraphBuilder< T >, fpmas::graph::SmallWorldGraphBuilder< T >, and fpmas::graph::DistributedUniformGraphBuilder< T >.


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