Functor which adds edges with the given probability to form a mesh of the given dimensions.
More...
|
| sparse_mesh_neighbors (size_t x, size_t y, double p, bool bidirectional, 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...
|
|
|
typedef boost::random::uniform_int_distribution< size_t > | rng_dist_t |
|
|
size_t | m_x |
|
size_t | m_y |
|
double | m_p |
|
bool | m_bidirectional |
|
boost::random::mt19937 | m_rng |
|
Functor which adds edges with the given probability to form a mesh of the given dimensions.
- See also
- make_sparse_mesh
◆ sparse_mesh_neighbors()
stapl::generators::detail::sparse_mesh_neighbors::sparse_mesh_neighbors |
( |
size_t |
x, |
|
|
size_t |
y, |
|
|
double |
p, |
|
|
bool |
bidirectional, |
|
|
unsigned int |
seed = get_location_id() |
|
) |
| |
- Parameters
-
x,y | Dimensions of the mesh. |
p | Probability of adding a given edge in the mesh. |
bidirectional | True to add back-edges in a directed graph. |
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 struct was generated from the following file: