Gromacs
2024.4
|
Functions | |
int | getSampleFromDistribution (ArrayRef< const double > distr, int64_t seed, int64_t indexSeed0, 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, |
int64_t | seed, | ||
int64_t | indexSeed0, | ||
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. |