|
template<typename Generator_t , typename EdgeDist , typename X_Dist , typename Y_Dist > |
| ClusteredGraphBuilder (Generator_t &generator, EdgeDist &edge_distribution, X_Dist &x_distribution, Y_Dist &y_distribution) |
|
template<typename EdgeDist , typename X_Dist , typename Y_Dist > |
| ClusteredGraphBuilder (EdgeDist &edge_distribution, X_Dist &x_distribution, Y_Dist &y_distribution) |
|
template<typename Generator_t , typename Distribution_t > |
| ClusteredGraphBuilder (Generator_t &generator, Distribution_t &edge_distribution) |
|
std::vector< api::graph::DistributedNode< T > * > | build (api::graph::NodeBuilder< T > &node_builder, api::graph::LayerId layer, api::graph::DistributedGraph< T > &graph) override |
|
virtual std::vector< api::graph::DistributedNode< T > * > | build (NodeBuilder< T > &node_builder, LayerId layer, DistributedGraph< T > &graph)=0 |
|
template<typename T>
class fpmas::graph::ClusteredGraphBuilder< T >
api::graph::GraphBuilder implementation that can be used to generate random clustered graphs. A random 2D coordinate is implicitly associated to each node : each node is then connected to its nearest neighbors.
A 2D coordinate is first assigned to each node provided by the node_builder, according to the specified x_distribution
and y_distribution
.
Then, for each node, an outgoing edge count n
is determined by edge_distribution
. The node is then connected to its n
nearest neighbors according to the previously computed coordinates.
Notice that those coordinates are completely implicit and independent from the kind of nodes actually built by the algorithm.
- Parameters
-
node_builder | NodeBuilder instance used to generate nodes |
layer | layer on which nodes will be linked |
graph | graph in which nodes and edges will be inserted |
Implements fpmas::api::graph::GraphBuilder< T >.