#include <itpp/base/random.h>
Public Member Functions | |
Bernoulli_RNG (double prob) | |
Binary source with probability prob for a 1. | |
Bernoulli_RNG () | |
Binary source with probability prob for a 1. | |
void | setup (double prob) |
set the probability | |
double | get_setup () const |
return the probability | |
bin | operator() () |
Get one sample. | |
bvec | operator() (int n) |
Get a sample vector. | |
bmat | operator() (int h, int w) |
Get a sample matrix. | |
bin | sample () |
Get a sample. | |
void | sample_vector (int size, bvec &out) |
Get a sample vector. | |
void | sample_matrix (int rows, int cols, bmat &out) |
Get a sample matrix. |
Definition at line 245 of file random.h.
itpp::Bernoulli_RNG::Bernoulli_RNG | ( | double | prob | ) | [inline] |
itpp::Bernoulli_RNG::Bernoulli_RNG | ( | ) | [inline] |
void itpp::Bernoulli_RNG::setup | ( | double | prob | ) | [inline] |
set the probability
Definition at line 252 of file random.h.
References it_assert.
Referenced by Bernoulli_RNG().
double itpp::Bernoulli_RNG::get_setup | ( | ) | const [inline] |
bin itpp::Bernoulli_RNG::operator() | ( | ) | [inline] |
bvec itpp::Bernoulli_RNG::operator() | ( | int | n | ) | [inline] |
bmat itpp::Bernoulli_RNG::operator() | ( | int | h, | |
int | w | |||
) | [inline] |
bin itpp::Bernoulli_RNG::sample | ( | ) | [inline] |
Get a sample.
Definition at line 266 of file random.h.
References itpp::Random_Generator::random_01().
Referenced by operator()(), itpp::randb(), sample_matrix(), and sample_vector().
void itpp::Bernoulli_RNG::sample_vector | ( | int | size, | |
bvec & | out | |||
) | [inline] |
Get a sample vector.
Definition at line 268 of file random.h.
References sample().
Referenced by operator()(), and itpp::randb().
void itpp::Bernoulli_RNG::sample_matrix | ( | int | rows, | |
int | cols, | |||
bmat & | out | |||
) | [inline] |
Get a sample matrix.
Definition at line 274 of file random.h.
References sample().
Referenced by operator()(), and itpp::randb().
Generated on Sat Aug 25 23:40:34 2007 for IT++ by Doxygen 1.5.2