| Signature | Description | Parameters |
|---|---|---|
template<std::size_t A = 0> std::vector<bool, typename allocator_declare<bool, A>::type> gen_bernoulli_dist(std::size_t n, const RandGenParams<bool> ¶ms = { }); |
It generates random Boolean values, according to the discrete probability function. The probability of true is:
⎧ p if b == true
P(b|p) = ⎨
⎩ 1 - p if b == false
It returns the vector of resultsOptional parameters to set: prob_true, seed |
A: Memory alignment boundary for vectors. Default is system default alignment n: Number of numeric to generate params: List of all applicable parameters, see DataFrameTypes.h |