protocol
sampling_protocol
Predicates for sampling probability distributions.
logtalk_load(random(loader))
static
Public predicates
normal/3
Returns a scaled normally (Gaussian) distributed random value with the given mean and standard deviation.
static
normal(Mean,Deviation,Value)
normal(+float,+non_negative_float,-float)
- one
lognormal/3
Returns a scaled log normally distributed random value with the given mean and standard deviation for the normal distribution.
static
lognormal(Mean,Deviation,Value)
lognormal(+float,+non_negative_float,-float)
- one
wald/3
Returns a scaled Wald (inverse Gaussian) distributed random value with the given mean.
static
wald(Mean,Scale,Value)
wald(+positive_float,+positive_float,-float)
- one
chi_squared/2
Returns a chi-squared distributed random value given the degrees of freedom.
static
chi_squared(DegreesOfFreedom,Value)
chi_squared(+positive_integer,-float)
- one
fisher/3
Returns a Fisher distributed random value given the degrees of freedom in the numerator and in the denominator.
static
fisher(DegreesOfFreedomNumerator,DegreesOfFreedomDenominator,Value)
fisher(+positive_integer,+positive_integer,-float)
- one
logseries/2
Returns a logseries distributed random value. Requires 0.0 < Shape < 1
and fails otherwise.
static
logseries(Shape,Value)
logseries(+non_negative_integer,-positive_integer)
- zero_or_one
geometric/2
Returns a geometric distributed random value (trials until the first success).
static
geometric(Probability,Value)
geometric(+probability,-positive_integer)
- one
hypergeometric/4
Returns a hypergeometric distributed random value.
static
hypergeometric(Population,Successes,Draws,Value)
hypergeometric(+non_negative_integer,+non_negative_integer,+non_negative_integer,-non_negative_integer)
- one
exponential/2
Returns a scaled exponentially distributed random value.
static
exponential(Scale,Value)
exponential(+positive_float,-float)
- one
binomial/3
Returns a binomial distributed random value.
static
binomial(Trials,Probability,Value)
binomial(+positive_integer,+positive_float,-float)
- one
bernoulli/2
Returns a Bernoulli distributed random value.
static
bernoulli(Probability,Value)
bernoulli(+positive_integer,-float)
- one
beta/3
Returns a beta distributed random value.
static
beta(Alpha,Beta,Value)
beta(+positive_float,+positive_float,-float)
- one
gamma/3
Returns a scaled gamma distributed random value.
static
gamma(Shape,Scale,Value)
gamma(+positive_float,+positive_float,-float)
- one
logistic/3
Returns a scaled logistic distributed random value.
static
logistic(Location,Scale,Value)
logistic(+float,+positive_float,-float)
- one
poisson/2
Returns a Poisson distributed random value given the expected number of events.
static
poisson(Mean,Value)
poisson(+non_negative_float,-non_negative_integer)
- one
power/2
Returns a power distributed random value.
static
power(Exponent,Value)
power(+positive_float,-float)
- one
weibull/3
Returns a scaled Weibull distributed random value.
static
weibull(Shape,Scale,Value)
weibull(+float,+positive_float,-float)
- one
uniform/3
Returns a uniform distributed random value in the interval``[Lower, Upper[. Fails if ``Lower
or Upper
are not integers or if Lower > Upper
. Same as random/3
.
static
uniform(Lower,Upper,Value)
uniform(+float,+float,-float)
- zero_or_one
uniform/1
Returns a uniform distributed random value in the interval``[0.0, 1.0[. Same as ``random/1
.
static
uniform(Value)
uniform(-float)
- one
triangular/4
Returns a triangular distributed random value. Fails if the Left =< Mode =< Right
condition does not hold.
static
triangular(Left,Mode,Right,Value)
triangular(+float,+float,+float,-float)
- zero_or_one
von_mises/3
Returns a von Mises distributed random value.
static
von_mises(Mode,Concentration,Value)
von_mises(+float,+non_negative_float,-float)
- zero_or_one
gumbel/3
Returns a Gumbel distributed random value.
static
gumbel(Location,Scale,Value)
gumbel(+float,+non_negative_float,-float)
- zero_or_one
dirichlet/2
Returns a Dirichlet distributed list of random values.
static
dirichlet(Alphas,Thetas)
dirichlet(+list(positive_float),-list(positive_float))
- one
circular_uniform_polar/3
Returns a circular uniform distributed random point in polar coordinates given the circle radius.
static
circular_uniform_polar(Radius,Rho,Theta)
circular_uniform_polar(+float,+float,-float)
- one
circular_uniform_cartesian/3
Returns a circular uniform distributed random point in cartesian coordinates given the circle radius.
static
circular_uniform_cartesian(Radius,X,Y)
circular_uniform_cartesian(+float,+float,-float)
- one
standard_t/2
Returns a standard Student’s t distributed random value given the degrees of freedom.
static
standard_t(DegreesOfFreedom,Value)
standard_t(+positive_integer,-float)
- one
standard_cauchy/3
Returns a standard Cauchy distributed random value.
static
standard_cauchy(Location,Scale,Value)
standard_cauchy(+float,+float,-float)
- one
standard_exponential/1
Returns a standard exponential distributed random value.
static
standard_exponential(Value)
standard_exponential(-float)
- one
standard_gamma/2
Returns a standard gamma distributed random value.
static
standard_gamma(Shape,Value)
standard_gamma(+positive_float,-float)
- one
standard_normal/1
Returns a standard normally (Gaussian) distributed random value (using a default mean of 0.0 and a default deviation of 1.0).
static
standard_normal(Value)
standard_normal(-float)
- one
Protected predicates
(none)
Private predicates
(none)
Operators
(none)
See also