|
IT++ 4.3.1
|
Bernoulli distribution. More...
#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. | |
|
inline |
|
inline |
|
inline |
set the probability
Definition at line 272 of file random.h.
References it_assert.
Referenced by Bernoulli_RNG().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get a sample.
Definition at line 286 of file random.h.
Referenced by operator()(), itpp::randb(), sample_matrix(), and sample_vector().
|
inline |
Get a sample vector.
Definition at line 288 of file random.h.
References sample(), and itpp::size().
Referenced by operator()(), and itpp::randb().
|
inline |
Get a sample matrix.
Definition at line 293 of file random.h.
References sample().
Referenced by operator()(), and itpp::randb().