Package space.kscience.kmath.samplers

Types

Link copied to clipboard
class AhrensDieterExponentialSampler(mean: Double) : Sampler<Double>

Sampling from an exponential distribution.

Link copied to clipboard
class AhrensDieterMarsagliaTsangGammaSampler : Sampler<Double>

Sampling from the gamma distribution.

Link copied to clipboard
open class AliasMethodDiscreteSampler : Sampler<Int>

Distribution sampler that uses the Alias method. It can be used to sample from n values each with an associated probability. This implementation is based on the detailed explanation of the alias method by Keith Schartz and implements Vose's algorithm.

Link copied to clipboard
interface BlockingDoubleSampler : Sampler<Double>
Link copied to clipboard
object BoxMullerSampler : NormalizedGaussianSampler

Box-Muller algorithm for sampling from a Gaussian distribution.

Link copied to clipboard
class GaussianSampler(mean: Double, standardDeviation: Double, normalized: NormalizedGaussianSampler) : BlockingDoubleSampler

Sampling from a Gaussian distribution with given mean and standard deviation.

Link copied to clipboard
class KempSmallMeanPoissonSampler : Sampler<Int>

Sampler for the Poisson distribution.

Link copied to clipboard
class LargeMeanPoissonSampler(mean: Double) : Sampler<Int>

Sampler for the Poisson distribution.

Link copied to clipboard

Marsaglia polar method for sampling from a Gaussian distribution with mean 0 and standard deviation 1. This is a variation of the algorithm implemented in BoxMullerNormalizedGaussianSampler.

Link copied to clipboard
fun interface NormalizedGaussianSampler : BlockingDoubleSampler

Marker interface for a sampler that generates values from an N(0,1) Gaussian distribution.

Link copied to clipboard
class SmallMeanPoissonSampler(mean: Double) : Sampler<Int>

Sampler for the Poisson distribution.

Link copied to clipboard

Marsaglia and Tsang "Ziggurat" method for sampling from a Gaussian distribution with mean 0 and standard deviation 1. The algorithm is explained in this paper and this implementation has been adapted from the C code provided therein.

Functions

Link copied to clipboard
fun KempSmallMeanPoissonSampler(mean: Double): KempSmallMeanPoissonSampler
Link copied to clipboard
fun PoissonSampler(mean: Double): Sampler<Int>

Sampler for the Poisson distribution.