#include <itpp/base/random.h>
Public Member Functions | |
| Uniform_RNG (double min=0, double max=1.0) | |
| Constructor. Set min, max and seed. | |
| void | setup (double min, double max) |
| set min and max | |
| void | get_setup (double &min, double &max) const |
| get parameters | |
| double | operator() () |
| Get one sample. | |
| vec | operator() (int n) |
| Get a sample vector. | |
| mat | operator() (int h, int w) |
| Get a sample matrix. | |
| double | sample () |
| Get a Uniformly distributed (0,1) sample. | |
| void | sample_vector (int size, vec &out) |
| Get a Uniformly distributed (0,1) vector. | |
| void | sample_matrix (int rows, int cols, mat &out) |
| Get a Uniformly distributed (0,1) matrix. | |
Definition at line 334 of file random.h.
| itpp::Uniform_RNG::Uniform_RNG | ( | double | min = 0, |
|
| double | max = 1.0 | |||
| ) |
| void itpp::Uniform_RNG::setup | ( | double | min, | |
| double | max | |||
| ) |
| void itpp::Uniform_RNG::get_setup | ( | double & | min, | |
| double & | max | |||
| ) | const |
| double itpp::Uniform_RNG::operator() | ( | ) | [inline] |
| vec itpp::Uniform_RNG::operator() | ( | int | n | ) | [inline] |
| mat itpp::Uniform_RNG::operator() | ( | int | h, | |
| int | w | |||
| ) | [inline] |
| double itpp::Uniform_RNG::sample | ( | ) | [inline] |
Get a Uniformly distributed (0,1) sample.
Definition at line 351 of file random.h.
References itpp::Random_Generator::random_01().
Referenced by operator()(), itpp::randu(), sample_matrix(), and sample_vector().
| void itpp::Uniform_RNG::sample_vector | ( | int | size, | |
| vec & | out | |||
| ) | [inline] |
Get a Uniformly distributed (0,1) vector.
Definition at line 353 of file random.h.
References sample().
Referenced by operator()(), and itpp::randu().
| void itpp::Uniform_RNG::sample_matrix | ( | int | rows, | |
| int | cols, | |||
| mat & | out | |||
| ) | [inline] |
Get a Uniformly distributed (0,1) matrix.
Definition at line 359 of file random.h.
References sample().
Referenced by operator()(), and itpp::randu().
Generated on Wed Apr 18 11:23:40 2007 for IT++ by Doxygen 1.5.2