Simbody
|
This is a subclass of Random that generates numbers uniformly distributed within a specified range. More...
#include <Random.h>
Public Member Functions | |
Uniform () | |
Create a new random number generator that produces values uniformly distributed between 0 (inclusive) and 1 (exclusive). | |
Uniform (Real min, Real max) | |
Create a new random number generator that produces values uniformly distributed between min (inclusive) and max (exclusive). | |
int | getIntValue () |
Get a random integer, uniformly distributed between 0 (inclusive) and max (exclusive). | |
Real | getMin () const |
Get the lower end of the range in which values are uniformly distributed. | |
void | setMin (Real min) |
Set the lower end of the range in which values are uniformly distributed. | |
Real | getMax () const |
Get the upper end of the range in which values are uniformly distributed. | |
void | setMax (Real max) |
Set the upper end of the range in which values are uniformly distributed. | |
Protected Member Functions | |
UniformImpl & | getImpl () |
Get the internal object which implements the random number generator. | |
const UniformImpl & | getConstImpl () const |
Get a constant reference to the internal object which implements the random number generator. |
This is a subclass of Random that generates numbers uniformly distributed within a specified range.
Create a new random number generator that produces values uniformly distributed between 0 (inclusive) and 1 (exclusive).
SimTK::Random::Uniform::Uniform | ( | Real | min, |
Real | max | ||
) |
Create a new random number generator that produces values uniformly distributed between min (inclusive) and max (exclusive).
int SimTK::Random::Uniform::getIntValue | ( | ) |
Get a random integer, uniformly distributed between 0 (inclusive) and max (exclusive).
Real SimTK::Random::Uniform::getMin | ( | ) | const |
Get the lower end of the range in which values are uniformly distributed.
void SimTK::Random::Uniform::setMin | ( | Real | min | ) |
Set the lower end of the range in which values are uniformly distributed.
Real SimTK::Random::Uniform::getMax | ( | ) | const |
Get the upper end of the range in which values are uniformly distributed.
void SimTK::Random::Uniform::setMax | ( | Real | max | ) |
Set the upper end of the range in which values are uniformly distributed.
UniformImpl& SimTK::Random::Uniform::getImpl | ( | ) | [protected] |
Get the internal object which implements the random number generator.
Reimplemented from SimTK::Random.
const UniformImpl& SimTK::Random::Uniform::getConstImpl | ( | ) | const [protected] |
Get a constant reference to the internal object which implements the random number generator.
Reimplemented from SimTK::Random.