Gromacs
2018.8
|
Functions | |
int | getSampleFromDistribution (ArrayRef< const double > distr, gmx_int64_t seed, gmx_int64_t indexSeed0, gmx_int64_t indexSeed1) |
Generate a sample from a discrete probability distribution defined on [0, distr.size() - 1]. More... | |
int gmx::anonymous_namespace{coordstate.cpp}::getSampleFromDistribution | ( | ArrayRef< const double > | distr, |
gmx_int64_t | seed, | ||
gmx_int64_t | indexSeed0, | ||
gmx_int64_t | indexSeed1 | ||
) |
Generate a sample from a discrete probability distribution defined on [0, distr.size() - 1].
The pair (indexSeed0,indexSeed1) should be different for every invocation.
[in] | distr | Normalized probability distribution to generate a sample from. |
[in] | seed | Random seed for initializing the random number generator. |
[in] | indexSeed0 | Random seed needed by the random number generator. |
[in] | indexSeed1 | Random seed needed by the random number generator. |