Graph generator for a random neighborhood graph. More...
Public Member Functions | |
random_neighborhood (G &g, size_t n, size_t ef, size_t k, bool bidirectional=true) | |
random_neighborhood (size_t n, size_t ef, size_t k, bool bidirectional=true) | |
void | add_vertices () |
Function which adds vertices to the graph. | |
void | add_edges () |
Function which adds the edges to the graph. More... | |
graph_type | operator() () |
Calls add_vertices and add_edges on the derived class. More... | |
Public Types | |
typedef generator_base< random_neighborhood< G > > | base_type |
Protected Member Functions | |
graph_type & | graph () |
void | add_vertices (VF const &vf) |
Function which is called to add vertices to the graph using the provided vertex addition functor. More... | |
void | add_edges (EF const &ef) |
Function which is called to add edges to the graph using the provided edge addition functor. More... | |
Protected Attributes | |
size_t | m_ef |
size_t | m_k |
bool | m_bidirectional |
Graph generator for a random neighborhood graph.
G | Type of the graph view used to construct the graph. |
stapl::generators::random_neighborhood< G >::random_neighborhood | ( | G & | g, |
size_t | n, | ||
size_t | ef, | ||
size_t | k, | ||
bool | bidirectional = true |
||
) |
g | View of the graph to generate |
n | The number of nodes in the graph |
ef | The average number of edges per vertex in the graph. |
k | The farthest neighbor that a vertex may connect to (+-k). |
bidirectional | True to add back-edges in a directed graph, false for forward edges only. |
stapl::generators::random_neighborhood< G >::random_neighborhood | ( | size_t | n, |
size_t | ef, | ||
size_t | k, | ||
bool | bidirectional = true |
||
) |
n | The number of nodes in the graph |
ef | The average number of edges per vertex in the graph. |
k | The farthest neighbor that a vertex may connect to (+-k). |
bidirectional | True to add back-edges in a directed graph, false for forward edges only. |
void stapl::generators::random_neighborhood< G >::add_edges | ( | ) |
Function which adds the edges to the graph.
|
protectedinherited |
Function which is called to add vertices to the graph using the provided vertex addition functor.
vf | Functor which is used to add vertices. |
|
protectedinherited |
Function which is called to add edges to the graph using the provided edge addition functor.
ef | Functor which is used to add edges. |
|
inherited |
Calls add_vertices and add_edges on the derived class.