A class for generating random numbers.
More...
#include <utils_distributions.hpp>
A class for generating random numbers.
This class provides methods for generating random numbers using a uniform distribution.
◆ RandomEngine()
◆ GetInstance()
Get a reference to the singleton RandomEngine instance.
This static method returns a reference to the singleton instance of the RandomEngine class.
- Returns
- A reference to the singleton instance of the RandomEngine class.
◆ GetUniformDistribution() [1/2]
double netdem::RandomEngine::GetUniformDistribution |
( |
double | bound_min, |
|
|
double | bound_max ) |
|
inline |
Generate a random number from a uniform distribution.
This method generates a single random number from a uniform distribution with the given bounds.
- Parameters
-
bound_min | The lower bound of the uniform distribution. |
bound_max | The upper bound of the uniform distribution. |
- Returns
- A random number from the uniform distribution with the given bounds.
◆ GetUniformDistribution() [2/2]
VecXT< double > netdem::RandomEngine::GetUniformDistribution |
( |
double | bound_min, |
|
|
double | bound_max, |
|
|
int | num ) |
|
inline |
Generate a list of random numbers from a uniform distribution.
This method generates a list of random numbers from a uniform distribution with the given bounds and number of elements.
- Parameters
-
bound_min | The lower bound of the uniform distribution. |
bound_max | The upper bound of the uniform distribution. |
num | The number of elements in the generated list. |
- Returns
- A vector of random numbers from the uniform distribution with the given bounds and number of elements.
◆ operator=()
Delete copy assignment operator.
The documentation for this class was generated from the following file: