STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Protected Member Functions
stapl::generators::generator_base< Derived > Class Template Reference

Base class for all graph generators. More...

Public Member Functions

 generator_base (size_t n)
 Constructs a generator, as well as a new graph of size n. More...
 
 generator_base (graph_type &g, size_t n)
 
graph_type operator() ()
 Calls add_vertices and add_edges on the derived class. More...
 

Protected Member Functions

graph_type & graph ()
 
void add_vertices ()
 Function which is called to add vertices to the graph using the default functor.
 
template<typename VF >
void add_vertices (VF const &vf)
 Function which is called to add vertices to the graph using the provided vertex addition functor. More...
 
template<typename EF >
void add_edges (EF const &ef)
 Function which is called to add edges to the graph using the provided edge addition functor. More...
 

Detailed Description

template<typename Derived>
class stapl::generators::generator_base< Derived >

Base class for all graph generators.

Template Parameters
DerivedType of the derived class, used to implement static polymorphism via the CRTP idiom.

Constructor & Destructor Documentation

◆ generator_base() [1/2]

template<typename Derived>
stapl::generators::generator_base< Derived >::generator_base ( size_t  n)

Constructs a generator, as well as a new graph of size n.

Parameters
nSize of the new graph.

◆ generator_base() [2/2]

template<typename Derived>
stapl::generators::generator_base< Derived >::generator_base ( graph_type &  g,
size_t  n 
)
Parameters
gView over the generated graph.
nSize of the graph.

Member Function Documentation

◆ add_vertices()

template<typename Derived>
template<typename VF >
void stapl::generators::generator_base< Derived >::add_vertices ( VF const &  vf)
protected

Function which is called to add vertices to the graph using the provided vertex addition functor.

Parameters
vfFunctor which is used to add vertices.

◆ add_edges()

template<typename Derived>
template<typename EF >
void stapl::generators::generator_base< Derived >::add_edges ( EF const &  ef)
protected

Function which is called to add edges to the graph using the provided edge addition functor.

Parameters
efFunctor which is used to add edges.

◆ operator()()

template<typename Derived>
graph_type stapl::generators::generator_base< Derived >::operator() ( void  )

Calls add_vertices and add_edges on the derived class.

Returns
A view over the generated graph.

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