pub enum DistType {
Uniform {
low: f64,
high: f64,
},
Normal {
mean: f64,
stdev: f64,
},
SkewNormal {
location: f64,
scale: f64,
shape: f64,
},
LogNormal {
mu: f64,
sigma: f64,
},
Binomial {
trials: u64,
probability: f64,
},
Geometric {
probability: f64,
},
Pareto {
scale: f64,
shape: f64,
},
Poisson {
lambda: f64,
},
Weibull {
scale: f64,
shape: f64,
},
Gamma {
scale: f64,
shape: f64,
},
Beta {
alpha: f64,
beta: f64,
},
}
Expand description
DistType represents the type of a Dist
. Supports a wide range of
different distributions. Some are probably useless and some are probably
missing. Uses the rand_distr
crate for sampling.
Variants§
Uniform
Uniformly random [low, high). If low == high, constant.
Normal
Normal distribution with set mean and standard deviation. Useful for real-valued quantities.
Fields
SkewNormal
SkewNormal distribution with set location, scale, and shape. Useful for real-valued quantities.
Fields
LogNormal
LogNormal distribution with set mu and sigma. Useful for real-valued quantities.
Binomial
Binomial distribution with set trials and probability. Useful for yes/no events.
Geometric
Geometric distribution with set probability. Useful for yes/no events.
Pareto
Pareto distribution with set scale and shape. Useful for occurrence of independent events at a given rate.
Poisson
Poisson distribution with set lambda. Useful for occurrence of independent events at a given rate.
Weibull
Weibull distribution with set scale and shape. Useful for occurrence of independent events at a given rate.
Gamma
Gamma distribution with set scale and shape.
Beta
Beta distribution with set alpha and beta.