IT++ Logo
Public Member Functions | List of all members
itpp::Bernoulli_RNG Class Reference

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.
 

Detailed Description

Bernoulli distribution.

Definition at line 264 of file random.h.


The documentation for this class was generated from the following file:
SourceForge Logo

Generated on Sat May 25 2013 16:32:29 for IT++ by Doxygen 1.8.2