bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
rl_example_2::BernoulliDist Class Reference

class BernoulliDist. Wrapper to std::bernoulli_distribution More...

#include <bernoulli_dist.h>

Public Types

using result_type = bool
 The return type every time we call pdf, sample.

Public Member Functions

 BernoulliDist (real_t p=0.5)
 Constructor.
result_type sample () const
 Sample from the distribution.
result_type sample (uint_t seed) const
 Sample from the distribution.
std::vector< result_type > sample_many (uint_t size) const
 sample from the distribution
std::vector< result_type > sample_many (uint_t size, uint_t seed) const
 sample from the distribution
real_t mean () const
 The mean value of the distribution.
real_t variance () const
 The STD of the distribution.
void reset ()
 Reset the underlying distribution.
void reset (real_t p)
 Reset the distribution with a new p.

Detailed Description

class BernoulliDist. Wrapper to std::bernoulli_distribution

Member Typedef Documentation

◆ result_type

The return type every time we call pdf, sample.

Constructor & Destructor Documentation

◆ BernoulliDist()

Member Function Documentation

◆ mean()

The mean value of the distribution.

◆ reset() [1/2]

Reset the underlying distribution.

◆ reset() [2/2]

Reset the distribution with a new p.

◆ sample() [1/2]

◆ sample() [2/2]

◆ sample_many() [1/2]

sample from the distribution

◆ sample_many() [2/2]

sample from the distribution

◆ variance()

The STD of the distribution.


The documentation for this class was generated from the following files: