Functor which rewires edges in a Watts-Strogatz graph.
More...
|
| ws_rewire (double p, size_t n, bool bidirectional, size_t max_proc, unsigned int seed=get_location_id()) |
|
template<typename Vertex , typename Graph > |
void | operator() (Vertex v, Graph &view) |
|
size_t | rand (void) |
| Generates a random number in the range [0, numeric_limits<size_t>::max()).
|
|
size_t | rand (size_t max) |
| Generates a random number in the range [0, max). More...
|
|
size_t | rand (size_t min, size_t max) |
| Generates a random number in the range [min, max). More...
|
|
|
using | result_type = void |
|
typedef boost::random::uniform_int_distribution< size_t > | rng_dist_t |
|
|
boost::random::mt19937 | m_rng |
|
template<bool Delete>
class stapl::generators::detail::ws_rewire< Delete >
Functor which rewires edges in a Watts-Strogatz graph.
- Template Parameters
-
Delete | Flag which indicates if an existing edge is deleted when a new one is added. |
- See also
- make_watts_strogatz
-
make_newman_watts_strogatz
◆ ws_rewire()
- Parameters
-
p | The probability of rewiring each edge. |
n | Size of the graph. |
bidirectional | True to add backedges, false otherwise. |
max_proc | Maximum number of locations used in a scaling study |
seed | The seed for random-number generation. |
◆ rand() [1/2]
size_t stapl::generators::rand_gen::rand |
( |
size_t |
max | ) |
|
|
inherited |
Generates a random number in the range [0, max).
- Parameters
-
max | The maximum value of the output random number (exclusive). |
◆ rand() [2/2]
size_t stapl::generators::rand_gen::rand |
( |
size_t |
min, |
|
|
size_t |
max |
|
) |
| |
|
inherited |
Generates a random number in the range [min, max).
- Parameters
-
min | The minimum value of the output random number. |
max | The maximum value of the output random number (exclusive). |
The documentation for this class was generated from the following file: