![]() |
fpmas 1.6
|
#include <graph_builder.h>
Public Member Functions | |
virtual std::size_t | localNodeCount ()=0 |
virtual DistributedNode< T > * | buildDistantNode (DistributedId id, int location, DistributedGraph< T > &graph)=0 |
![]() | |
virtual std::size_t | nodeCount ()=0 |
virtual DistributedNode< T > * | buildNode (DistributedGraph< T > &graph)=0 |
Distributed extension of the NodeBuilder.
The purpose of the DistributedNodeBuilder is similar to the NodeBuilder, but adds distribution specific features.
T | graph datatype |
|
pure virtual |
Returns the count of nodes that the DistributedNodeBuilder can generate on the current process.
The value returned by this function is expected to be updated while buildNode() calls are performed.
Implemented in fpmas::graph::DistributedNodeBuilder< T >, fpmas::graph::DistributedNodeBuilder< int >, and fpmas::graph::DistributedNodeBuilder< AgentPtr >.
|
pure virtual |
Builds a distant node in the specified graph
, with the provided id
. The node is assumed to be currently owned by the process with rank location
.
Such a node can be considered as a "temporary" node, that can be used by the underlying algorithm to build edges with nodes that are currently not located on this process.
Implementations are likely to behave as follow:
Notice that the count of nodes built using this method is not limited and is not correlated to localNodeCount() or nodeCount(), contrary to the buildNode() method.
id | id of the distant node |
location | current node location |
graph | graph in which the distant node will be inserted |