#include <itpp/base/random.h>
Public Member Functions | |
Normal_RNG (double meanval, double variance) | |
Constructor. Set mean and variance. | |
Normal_RNG () | |
Constructor. Set mean and variance. | |
void | setup (double meanval, double variance) |
Set mean, and variance. | |
void | get_setup (double &meanval, double &variance) const |
Get mean and variance. | |
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 Normal distributed (0,1) sample. | |
void | sample_vector (int size, vec &out) |
Get a Normal distributed (0,1) vector. | |
void | sample_matrix (int rows, int cols, mat &out) |
Get a Normal distributed (0,1) matrix. |
Definition at line 404 of file random.h.
itpp::Normal_RNG::Normal_RNG | ( | double | meanval, | |
double | variance | |||
) | [inline] |
itpp::Normal_RNG::Normal_RNG | ( | ) | [inline] |
void itpp::Normal_RNG::setup | ( | double | meanval, | |
double | variance | |||
) | [inline] |
Set mean, and variance.
Definition at line 411 of file random.h.
References itpp::sqrt().
Referenced by Normal_RNG().
void itpp::Normal_RNG::get_setup | ( | double & | meanval, | |
double & | variance | |||
) | const |
double itpp::Normal_RNG::operator() | ( | ) | [inline] |
vec itpp::Normal_RNG::operator() | ( | int | n | ) | [inline] |
mat itpp::Normal_RNG::operator() | ( | int | h, | |
int | w | |||
) | [inline] |
double itpp::Normal_RNG::sample | ( | ) | [inline] |
Get a Normal distributed (0,1) sample.
Definition at line 422 of file random.h.
References itpp::log(), itpp::Random_Generator::random_01(), and itpp::sqrt().
Referenced by operator()(), itpp::randn(), sample_matrix(), and sample_vector().
void itpp::Normal_RNG::sample_vector | ( | int | size, | |
vec & | out | |||
) | [inline] |
Get a Normal distributed (0,1) vector.
Definition at line 435 of file random.h.
References sample().
Referenced by operator()(), and itpp::randn().
void itpp::Normal_RNG::sample_matrix | ( | int | rows, | |
int | cols, | |||
mat & | out | |||
) | [inline] |
Get a Normal distributed (0,1) matrix.
Definition at line 442 of file random.h.
References sample().
Referenced by operator()(), and itpp::randn().
Generated on Fri Jun 8 02:09:03 2007 for IT++ by Doxygen 1.5.2