Rand
A trait for monadic distributions. Provides support for use in for-comprehensions
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait ContinuousDistr[T]class Mixedclass Paretotrait DiscreteDistr[T]class Empiricalclass NegativeBinomialclass PoissonShow all
- Self type
-
Rand[T]
Members list
Value members
Abstract methods
Gets one sample from the distribution. Equivalent to sample
Gets one sample from the distribution. Equivalent to sample
Attributes
Concrete methods
Overridden by filter/map/flatmap for monadic invocations. Basically, rejection samplers will return None here
Overridden by filter/map/flatmap for monadic invocations. Basically, rejection samplers will return None here
Attributes
Converts a random sampler of one type to a random sampler of another type. Examples: uniform.map(_2) gives a Rand[Double] in the range [0,2] Equivalently, for(x <- uniform) yield 2x
Converts a random sampler of one type to a random sampler of another type. Examples: uniform.map(_2) gives a Rand[Double] in the range [0,2] Equivalently, for(x <- uniform) yield 2x
Value parameters
- f
-
the transform to apply to the sampled value.
Attributes
Gets one sample from the distribution. Equivalent to get
Gets one sample from the distribution. Equivalent to get
Attributes
Gets n samples from the distribution.
Gets n samples from the distribution.
Attributes
Gets n samples from the distribution into a specified collection type.
Gets n samples from the distribution into a specified collection type.
Attributes
An infinitely long iterator that samples repeatedly from the Rand
An infinitely long iterator that samples repeatedly from the Rand
Attributes
- Returns
-
an iterator that repeatedly samples