STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Member Functions | Protected Attributes
stapl::generators::detail::erdos_renyi_m_generator< G > Struct Template Reference

Graph generator for a Erdos-Renyi type M graph. More...

Public Member Functions

 erdos_renyi_m_generator (std::size_t size, std::size_t m, bool bidirectional)
 
 erdos_renyi_m_generator (G &g, std::size_t size, std::size_t m, bool bidirectional)
 
void add_edges ()
 Function which is called to add edges to the graph.
 
graph_type operator() ()
 Calls add_vertices and add_edges on the derived class. More...
 

Public Types

using base_type = generator_base< erdos_renyi_m_generator< G > >
 

Protected Member Functions

graph_type & graph ()
 
void add_vertices ()
 Function which is called to add vertices to the graph using the default functor.
 
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

std::size_t m_n
 
std::size_t m_m
 
bool m_bidirectional
 

Detailed Description

template<typename G>
struct stapl::generators::detail::erdos_renyi_m_generator< G >

Graph generator for a Erdos-Renyi type M graph.

Template Parameters
GType of the graph view used to construct the graph.

Constructor & Destructor Documentation

◆ erdos_renyi_m_generator() [1/2]

template<typename G >
stapl::generators::detail::erdos_renyi_m_generator< G >::erdos_renyi_m_generator ( std::size_t  size,
std::size_t  m,
bool  bidirectional 
)
Parameters
sizeThe number of vertices
mThe number of edges to generate
bidirectionalWhether to add back edges

◆ erdos_renyi_m_generator() [2/2]

template<typename G >
stapl::generators::detail::erdos_renyi_m_generator< G >::erdos_renyi_m_generator ( G &  g,
std::size_t  size,
std::size_t  m,
bool  bidirectional 
)
Parameters
gView over the graph to generate.
sizeThe number of vertices
mThe number of edges to generate
bidirectionalWhether to add back edges

Member Function Documentation

◆ add_vertices()

void stapl::generators::generator_base< erdos_renyi_m_generator< G > >::add_vertices ( VF const &  vf)
protectedinherited

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()

void stapl::generators::generator_base< erdos_renyi_m_generator< G > >::add_edges ( EF const &  ef)
protectedinherited

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()()

graph_type stapl::generators::generator_base< erdos_renyi_m_generator< G > >::operator() ( void  )
inherited

Calls add_vertices and add_edges on the derived class.

Returns
A view over the generated graph.

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