|
NetDEM v1.0
|
Generates random numbers from a uniform distribution. More...
#include <distribution_uniform.hpp>
Public Member Functions | |
| UniformDistribution () | |
| Default constructor. | |
| UniformDistribution (double bound_min, double bound_max) | |
| Constructor that takes bounds as input parameters. | |
| double | Get () override |
| Get a single random number from the uniform distribution. | |
| VecXT< double > | Get (int num) override |
| Get multiple random numbers from the uniform distribution. | |
Public Member Functions inherited from netdem::Distribution | |
| virtual | ~Distribution () |
Public Attributes | |
| double | bound_min |
| Lower and upper bounds of the uniform distribution. | |
| double | bound_max |
Generates random numbers from a uniform distribution.
This class generates random numbers from a uniform distribution with specified bounds.
|
inline |
Default constructor.
This constructor initializes the lower and upper bounds of the uniform distribution to 0 and 1, respectively. It also initializes the random number generator and distribution.
|
inline |
Constructor that takes bounds as input parameters.
This constructor initializes the lower and upper bounds of the uniform distribution to the values passed in via bound_min and bound_max, respectively. It also initializes the random number generator and distribution.
| bound_min | The lower bound of the uniform distribution. |
| bound_max | The upper bound of the uniform distribution. |
|
inlineoverridevirtual |
Get a single random number from the uniform distribution.
Implements netdem::Distribution.
|
inlineoverridevirtual |
Get multiple random numbers from the uniform distribution.
This method generates num random numbers from the uniform distribution and returns them as a vector.
| num | The number of random numbers to generate. |
num random numbers generated from the uniform distribution. Implements netdem::Distribution.
| double netdem::UniformDistribution::bound_max |
| double netdem::UniformDistribution::bound_min |
Lower and upper bounds of the uniform distribution.