Bernoulli distribution.
More...
#include <itpp/base/random.h>
Bernoulli distribution.
Definition at line 264 of file random.h.
◆ Bernoulli_RNG() [1/2]
itpp::Bernoulli_RNG::Bernoulli_RNG |
( |
double |
prob | ) |
|
|
inline |
Binary source with probability prob for a 1.
Definition at line 268 of file random.h.
◆ Bernoulli_RNG() [2/2]
itpp::Bernoulli_RNG::Bernoulli_RNG |
( |
| ) |
|
|
inline |
Binary source with probability prob for a 1.
Definition at line 270 of file random.h.
◆ setup()
void itpp::Bernoulli_RNG::setup |
( |
double |
prob | ) |
|
|
inline |
◆ get_setup()
double itpp::Bernoulli_RNG::get_setup |
( |
| ) |
const |
|
inline |
return the probability
Definition at line 278 of file random.h.
◆ operator()() [1/3]
bin itpp::Bernoulli_RNG::operator() |
( |
| ) |
|
|
inline |
Get one sample.
Definition at line 280 of file random.h.
◆ operator()() [2/3]
bvec itpp::Bernoulli_RNG::operator() |
( |
int |
n | ) |
|
|
inline |
Get a sample vector.
Definition at line 282 of file random.h.
◆ operator()() [3/3]
bmat itpp::Bernoulli_RNG::operator() |
( |
int |
h, |
|
|
int |
w |
|
) |
| |
|
inline |
Get a sample matrix.
Definition at line 284 of file random.h.
◆ sample()
bin itpp::Bernoulli_RNG::sample |
( |
| ) |
|
|
inline |
◆ sample_vector()
void itpp::Bernoulli_RNG::sample_vector |
( |
int |
size, |
|
|
bvec & |
out |
|
) |
| |
|
inline |
◆ sample_matrix()
void itpp::Bernoulli_RNG::sample_matrix |
( |
int |
rows, |
|
|
int |
cols, |
|
|
bmat & |
out |
|
) |
| |
|
inline |
The documentation for this class was generated from the following file: