#include <RandomGenerator.h>
Generate Random number based on random functions from OpenBSD
Public Member Functions | |
RandomGenerator () | |
RandomGenerator (long seed) | |
virtual | ~RandomGenerator () |
void | initSeed (long seed) |
template<class T > | |
T | random (T min, T max) |
template<class T > | |
T | symrand (T vmax) |
number between [-vmax, vmax] (vmax has less chance to appear) More... | |
template<class T > | |
T | random () |
template<> | |
long | random (long min, long max) |
template<> | |
double | random (double min, double max) |
template<> | |
float | random (float min, float max) |
template<> | |
bool | random (bool, bool) |
template<> | |
double | random () |
Protected Member Functions | |
unsigned long int | randomBase () |
integer between [0, 2^32-1) More... | |
sofa::helper::RandomGenerator::RandomGenerator | ( | ) |
sofa::helper::RandomGenerator::RandomGenerator | ( | long | seed | ) |
|
virtual |
void sofa::helper::RandomGenerator::initSeed | ( | long | seed | ) |
|
inline |
number between [T::min, T::max) (max has less chance to appear) note that "only" 2^32 different values can be generated
|
inline |
|
inline |
|
inline |
|
inline |
number between [min, max) (max has less chance to appear) note that "only" 2^32 different values can be generated
|
protected |
integer between [0, 2^32-1)
|
inline |
number between [-vmax, vmax] (vmax has less chance to appear)