Summary
A Bernoulli distribution, where each sample returns either
or
.- Namespace
- RandN
.Distributions - Interfaces
- I
Portable Distribution <bool> - IDistribution
<bool> - IDistribution
- I
- Base Types
- object
- ValueType
Syntax
public readonly struct Bernoulli : ValueType, IPortableDistribution<bool>, IDistribution<bool>
Methods
Name | Value | Summary |
---|---|---|
FromP | Bernoulli | Creates a new Bernoulli distribution with a probability of p. static |
Extension Methods
Name | Value | Summary | ||||||
---|---|---|---|---|---|---|---|---|
Select | IDistribution Transforms a distribution by mapping its values using the selector provided. This method implements the "map" operator from functional programming principles. SelectMany | IDistribution | Transforms a distribution by mapping values using the selector provided to produce a new distribution, which is then sampled from. SelectMany | IDistribution | Transforms a distribution by mapping values using the selector provided to produce a new distribution, which is then sampled from. This method implements the "bind" operator from functional programming principles. |