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

Functor which connects vertices with their k-nearest neighbors to form a Watts-Strogatz graph. More...

Public Member Functions

 ws_neighbors (size_t i, size_t n, bool bidirectional)
 
template<typename Vertex , typename Graph >
void operator() (Vertex v, Graph &view)
 

Public Types

typedef void result_type
 

Public Attributes

size_t m_i
 
size_t m_n
 
bool m_bidirectional
 

Detailed Description

Functor which connects vertices with their k-nearest neighbors to form a Watts-Strogatz graph.

See also
make_watts_strogatz
make_newman_watts_strogatz

Constructor & Destructor Documentation

◆ ws_neighbors()

stapl::generators::detail::ws_neighbors::ws_neighbors ( size_t  i,
size_t  n,
bool  bidirectional 
)
Parameters
iDistance of neighbor to connect to.
nSize of the graph.
bidirectionalTrue to add backedges, false otherwise.

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