|
bitsim
Model, simulate, estimate and control robots in C++
|
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. | |
class BernoulliDist. Wrapper to std::bernoulli_distribution
| using bitsim::maths::stats::BernoulliDist::result_type = bool |
The return type every time we call pdf, sample.
|
explicit |
Constructor.
|
inline |
The mean value of the distribution.
|
inline |
Reset the underlying distribution.
Reset the distribution with a new p.
Sample from the distribution.
Sample from the distribution.
| std::vector< BernoulliDist::result_type > bitsim::maths::stats::BernoulliDist::sample_many | ( | uint_t | size | ) | const |
sample from the distribution
| std::vector< BernoulliDist::result_type > bitsim::maths::stats::BernoulliDist::sample_many | ( | uint_t | size, |
| uint_t | seed ) const |
sample from the distribution
|
inline |
The STD of the distribution.