Returns the unnormalized value of the measure
Returns the unnormalized value of the measure
Computes the cumulative density function of the value x.
Gets one sample from the distribution.
Overridden by filter/map/flatmap for monadic invocations.
Overridden by filter/map/flatmap for monadic invocations. Basically, rejeciton samplers will return None here
Converts a random sampler of one type to a random sampler of another type.
Converts a random sampler of one type to a random sampler of another type. Examples: randInt(10).flatMap(x => randInt(3 * x.asInstanceOf[Int]) gives a Rand[Int] in the range [0,30] Equivalently, for(x <- randInt(10); y <- randInt(30 *x)) yield y
the transform to apply to the sampled value.
Samples one element and qpplies the provided function to it.
Samples one element and qpplies the provided function to it. Despite the name, the function is applied once. Sample usage:
for(x <- Rand.uniform) { println(x) }
the function to be applied
Computes the inverse cdf of the p-value for this gaussian.
Computes the inverse cdf of the p-value for this gaussian.
x s.t. cdf(x) = numYes
Returns the log unnormalized value of the measure
Returns the log unnormalized value of the measure
Converts a random sampler of one type to a random sampler of another type.
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 2*x
the transform to apply to the sampled value.
Returns the probability density function at that point.
Returns the probability density function at that point.
Computes the probability that a Gaussian variable Z is within the interval [x, y].
Computes the probability that a Gaussian variable Z is within the interval [x, y]. This probability is computed as P[Z < y] - P[Z < x].
lower-end of the interval
upper-end of the interval
probability that the Gaussian random variable Z lies in the interval [x, y]
Gets n samples from the distribution.
Gets n samples from the distribution.
Gets one sample from the distribution.
Gets one sample from the distribution. Equivalent to get()
An infinitely long iterator that samples repeatedly from the Rand
An infinitely long iterator that samples repeatedly from the Rand
an iterator that repeatedly samples
Return a vector of samples.
Return a vector of samples.
Returns the probability density function up to a constant at that point.
Returns the probability density function up to a constant at that point.
Represents a Gaussian distribution over a single real variable.