Generator which generates a graph using the provided edge and vertex functors. More...
Public Member Functions | |
generator (G &g, size_t num_vertices, EF const &edge_gen, VF const &vertex_gen=VF()) | |
generator (size_t num_vertices, EF const &edge_gen, VF const &vertex_gen=VF()) | |
void | add_vertices () |
Function which is called to add vertices. | |
void | add_edges () |
Function which is called to add edges. | |
graph_type | operator() () |
Calls add_vertices and add_edges on the derived class. More... | |
Public Types | |
typedef generator_base< generator< G, EF, VF > > | 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 | |
EF | m_edge_gen |
VF | m_vertex_gen |
Generator which generates a graph using the provided edge and vertex functors.
G | Type of the view over the generated graph. |
EF | Type of the edge generation functor. |
VF | Type of the vertex generation functor. |
Generates a graph with N vertices. Vertices are generated using the provided functor, or are numbered [0,N) with a default property otherwise. Edges are added using the provided functor.
stapl::generators::generator< G, EF, VF >::generator | ( | G & | g, |
size_t | num_vertices, | ||
EF const & | edge_gen, | ||
VF const & | vertex_gen = VF() |
||
) |
g | View of the graph to generate. |
num_vertices | The number of vertices in the graph. |
edge_gen | The edge generator. |
vertex_gen | The vertex generator. |
stapl::generators::generator< G, EF, VF >::generator | ( | size_t | num_vertices, |
EF const & | edge_gen, | ||
VF const & | vertex_gen = VF() |
||
) |
num_vertices | The number of vertices in the graph. |
edge_gen | The edge generator. |
vertex_gen | The vertex generator. |
|
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.