Work function which adds edges to the given graph to form a random neighborhood.
More...
|
| random_k_neighbors (size_t num_vertices, size_t local_size, size_t ef, size_t k, bool bidirectional, unsigned int seed=get_location_id()) |
|
template<typename T , typename V > |
void | operator() (T x, V &view) |
| Adds the edges for the portion of the vertices assigned to location x. More...
|
|
|
size_t | m_size |
|
size_t | m_local_size |
|
size_t | m_ef |
|
size_t | m_k |
|
bool | m_bidirectional |
|
|
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 |
|
|
boost::random::mt19937 | m_rng |
|
Work function which adds edges to the given graph to form a random neighborhood.
◆ random_k_neighbors()
stapl::generators::detail::random_k_neighbors::random_k_neighbors |
( |
size_t |
num_vertices, |
|
|
size_t |
local_size, |
|
|
size_t |
ef, |
|
|
size_t |
k, |
|
|
bool |
bidirectional, |
|
|
unsigned int |
seed = get_location_id() |
|
) |
| |
- Parameters
-
num_vertices | Total size of graph. |
local_size | Number of vertices on a single location. |
Name | Description |
seed | The seed for random-number generation. |
◆ operator()()
template<typename T , typename V >
void stapl::generators::detail::random_k_neighbors::operator() |
( |
T |
x, |
|
|
V & |
view |
|
) |
| |
Adds the edges for the portion of the vertices assigned to location x.
- Parameters
-
x | Location id which owns vertices where edges are added. |
view | View over the graph to which the edges are added. |
◆ 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: