cgv
|
#include <random.h>
Public Member Functions | |
void | set_seed (unsigned long long seed) |
set a new seed | |
random () | |
standard constructor uses system time as random seed | |
random (unsigned long long seed) | |
constructor initializes random generator with given seed | |
void | uniform (unsigned long long &rv) |
generates 64bit pseudo random integer | |
void | uniform (unsigned int &rv) |
generates a 32bit pseudo random unsigned integer | |
void | uniform (int &rv) |
generates a 32bit pseudo random signed integer | |
void | uniform (long &rv) |
generates a 32bit pseudo random signed integer | |
void | uniform (long long &rv) |
generates a 64bit pseudo random signed integer | |
void | uniform (bool &rv) |
generates a pseudo random boolean | |
void | uniform (const unsigned min, const unsigned max, unsigned &rv) |
generates a pseudo random integer between min and max | |
void | uniform (const int min, const int max, int &rv) |
generates a pseudo random integer between min and max | |
void | uniform (double &rv) |
generates a pseudo random double-precision floating point number uniformly distributed between 0 and 1 | |
void | uniform (const double min, const double max, double &rv) |
generates a pseudo random double-precision floating point number uniformly distributed between min and max | |
void | uniform (float &rv) |
generates a pseudo random single-precision floating point number uniformly distributed between 0 and 1 | |
void | uniform (const float min, const float max, float &rv) |
generates a pseudo random single-precision floating point number uniformly distributed between 0 and 1 | |
void | uniform (vec< float > &rv) |
generates a pseudo random single precision vector with uniformly distribute components between 0 and 1 | |
void | uniform (const float min, const float max, vec< float > &rv) |
generates a pseudo random single precision vector with uniformly distribute components between min and max | |
void | uniform (vec< double > &rv) |
generates a pseudo random double precision vector with uniformly distribute components between 0 and 1 | |
void | uniform (const double min, const double max, vec< double > &rv) |
generates a pseudo random double precision vector with uniformly distribute components between min and max | |
void | uniform (mat< float > &rv) |
generates a pseudo random single precision full matrix with uniformly distribute components between 0 and 1 | |
void | uniform (const float min, const float max, mat< float > &rv) |
generates a pseudo random single precision full matrix with uniformly distribute components between min and max | |
void | uniform (perm_mat &rv) |
generates a pseudo random permutation matrix | |
void | uniform (up_tri_mat< float > &rv) |
generates a pseudo random single precision upper triangular matrix with uniformly distribute components between 0 and 1 | |
void | uniform (const float min, const float max, up_tri_mat< float > &rv) |
generates a pseudo random single precision upper triangular matrix with uniformly distribute components between min and max | |
void | uniform (up_tri_mat< double > &rv) |
generates a pseudo random double precision upper triangular matrix with uniformly distribute components between 0 and 1 | |
void | uniform (const double min, const double max, up_tri_mat< double > &rv) |
generates a pseudo random double precision upper triangular matrix with uniformly distribute components between min and max | |
void | uniform (low_tri_mat< float > &rv) |
generates a pseudo random single precision lower triangular matrix with uniformly distribute components between 0 and 1 | |
void | uniform (const float min, const float max, low_tri_mat< float > &rv) |
generates a pseudo random single precision lower triangular matrix with uniformly distribute components between min and max | |
void | uniform (low_tri_mat< double > &rv) |
generates a pseudo random double precision lower triangular matrix with uniformly distribute components between 0 and 1 | |
void | uniform (const double min, const double max, low_tri_mat< double > &rv) |
generates a pseudo random double precision lower triangular matrix with uniformly distribute components between min and max | |
void | uniform (diag_mat< float > &rv) |
generates a pseudo random single precision diagonal matrix with uniformly distribute components between 0 and 1 | |
void | uniform (const float min, const float max, diag_mat< float > &rv) |
generates a pseudo random single precision diagonal matrix with uniformly distribute components between min and max | |
void | uniform (diag_mat< double > &rv) |
generates a pseudo random double precision diagonal matrix with uniformly distribute components between 0 and 1 | |
void | uniform (const double min, const double max, diag_mat< double > &rv) |
generates a pseudo random double precision diagonal matrix with uniformly distribute components between min and max | |
void | uniform (mat< double > &rv) |
generates a pseudo random double full matrix with uniformly distribute components between 0 and 1 | |
void | uniform (const double min, const double max, mat< double > &rv) |
generates a pseudo random double full matrix with uniformly distribute components between min and max | |
void | normal (double &rv) |
generates a normal deviate double-precision floating point value with mu = 0 and sigma = 1 | |
void | normal (float &rv) |
generates a normal deviate single-precision floating point value with mu = 0 and sigma = 1 | |
void | normal (const double mu, const double sigma, double &rv) |
generates a normal deviate double-precision floating point value with mu and sigma | |
void | normal (const float mu, const float sigma, float &rv) |
generates a normal deviate single-precision floating point value with mu and sigma | |
void | uniform_direction (vec< float > &v) |
generates a single precision random direction (uniformly distributed position on the unit sphere) | |
void | uniform_direction (vec< double > &v) |
generates a double precision random direction (uniformly distributed position on the unit sphere) | |
void | uniform_quat_orientation (vec< float > &q) |
generates a single precision random orientation represented as a unit quaternion | |
void | uniform_quat_orientation (vec< double > &q) |
void | uniform_orientation (mat< float > &m) |
generates a single precision random orientation represented as a rotation matrix | |
void | uniform_orientation (mat< double > &m) |
generates a double precision random orientation represented as a rotation matrix | |
void | uniform_point_in_unit_box (vec< double > &p) |
creates an uniform distributed random point in unit box (0,0,...,0)..(1,1,...,1); if dim(p)=0, it is set to 3 | |
void | uniform_point_in_box (const vec< double > &minp, const vec< double > &maxp, vec< double > &p) |
creates an uniform distributed random point in box minp..maxp | |
void | uniform_point_in_unit_ball (vec< double > &p) |
creates an uniform distributed random point in unit sphere | |
void | uniform_point_in_triangle (const vec< double > &p1, const vec< double > &p2, const vec< double > &p3, vec< double > p) |
creates an uniform distributed random point in triangle p1,p2,p3 | |
void | uniform_point_on_sphere (const vec< double > ¢er, const double &radius, vec< double > &p) |
creates an uniform distributed random point on the surface of a sphere with given center and radius | |
void | uniform_nchoosek (unsigned n, unsigned k, vec< unsigned > &indices) |
creates a vector of k unique indices drawn from 0 to n-1 | |
High quality random number generator, which is a little bit slower than typical random number generators but with a period about 3.138 x 10^57.
|
inline |
generates a double precision random orientation represented as a unit quaternion