protocol
sampling_protocol
Predicates for sampling probability distributions.
logtalk_load(random(loader))staticPublic predicates
normal/3
Returns a scaled normally (Gaussian) distributed random value with the given mean and standard deviation.
staticnormal(Mean,Deviation,Value)normal(+float,+non_negative_float,-float) - onelognormal/3
Returns a scaled log normally distributed random value with the given mean and standard deviation for the normal distribution.
staticlognormal(Mean,Deviation,Value)lognormal(+float,+non_negative_float,-float) - onewald/3
Returns a scaled Wald (inverse Gaussian) distributed random value with the given mean.
staticwald(Mean,Scale,Value)wald(+positive_float,+positive_float,-float) - onechi_squared/2
Returns a chi-squared distributed random value given the degrees of freedom.
staticchi_squared(DegreesOfFreedom,Value)chi_squared(+positive_integer,-float) - onefisher/3
Returns a Fisher distributed random value given the degrees of freedom in the numerator and in the denominator.
staticfisher(DegreesOfFreedomNumerator,DegreesOfFreedomDenominator,Value)fisher(+positive_integer,+positive_integer,-float) - onelogseries/2
Returns a logseries distributed random value. Requires 0.0 < Shape < 1 and fails otherwise.
staticlogseries(Shape,Value)logseries(+non_negative_integer,-positive_integer) - zero_or_onegeometric/2
Returns a geometric distributed random value (trials until the first success).
staticgeometric(Probability,Value)geometric(+probability,-positive_integer) - onehypergeometric/4
Returns a hypergeometric distributed random value.
statichypergeometric(Population,Successes,Draws,Value)hypergeometric(+non_negative_integer,+non_negative_integer,+non_negative_integer,-non_negative_integer) - oneexponential/2
Returns a scaled exponentially distributed random value.
staticexponential(Scale,Value)exponential(+positive_float,-float) - onebinomial/3
Returns a binomial distributed random value.
staticbinomial(Trials,Probability,Value)binomial(+positive_integer,+positive_float,-float) - onebernoulli/2
Returns a Bernoulli distributed random value.
staticbernoulli(Probability,Value)bernoulli(+positive_integer,-float) - onebeta/3
Returns a beta distributed random value.
staticbeta(Alpha,Beta,Value)beta(+positive_float,+positive_float,-float) - onegamma/3
Returns a scaled gamma distributed random value.
staticgamma(Shape,Scale,Value)gamma(+positive_float,+positive_float,-float) - onelogistic/3
Returns a scaled logistic distributed random value.
staticlogistic(Location,Scale,Value)logistic(+float,+positive_float,-float) - onepoisson/2
Returns a Poisson distributed random value given the expected number of events.
staticpoisson(Mean,Value)poisson(+non_negative_float,-non_negative_integer) - onepower/2
Returns a power distributed random value.
staticpower(Exponent,Value)power(+positive_float,-float) - oneweibull/3
Returns a scaled Weibull distributed random value.
staticweibull(Shape,Scale,Value)weibull(+float,+positive_float,-float) - oneuniform/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.
staticuniform(Lower,Upper,Value)uniform(+float,+float,-float) - zero_or_oneuniform/1
Returns a uniform distributed random value in the interval``[0.0, 1.0[. Same as ``random/1.
staticuniform(Value)uniform(-float) - onetriangular/4
Returns a triangular distributed random value. Fails if the Left =< Mode =< Right condition does not hold.
statictriangular(Left,Mode,Right,Value)triangular(+float,+float,+float,-float) - zero_or_onevon_mises/3
Returns a von Mises distributed random value.
staticvon_mises(Mode,Concentration,Value)von_mises(+float,+non_negative_float,-float) - zero_or_onegumbel/3
Returns a Gumbel distributed random value.
staticgumbel(Location,Scale,Value)gumbel(+float,+non_negative_float,-float) - zero_or_onedirichlet/2
Returns a Dirichlet distributed list of random values.
staticdirichlet(Alphas,Thetas)dirichlet(+list(positive_float),-list(positive_float)) - onecircular_uniform_polar/3
Returns a circular uniform distributed random point in polar coordinates given the circle radius.
staticcircular_uniform_polar(Radius,Rho,Theta)circular_uniform_polar(+float,+float,-float) - onecircular_uniform_cartesian/3
Returns a circular uniform distributed random point in cartesian coordinates given the circle radius.
staticcircular_uniform_cartesian(Radius,X,Y)circular_uniform_cartesian(+float,+float,-float) - onestandard_t/2
Returns a standard Student’s t distributed random value given the degrees of freedom.
staticstandard_t(DegreesOfFreedom,Value)standard_t(+positive_integer,-float) - onestandard_cauchy/3
Returns a standard Cauchy distributed random value.
staticstandard_cauchy(Location,Scale,Value)standard_cauchy(+float,+float,-float) - onestandard_exponential/1
Returns a standard exponential distributed random value.
staticstandard_exponential(Value)standard_exponential(-float) - onestandard_gamma/2
Returns a standard gamma distributed random value.
staticstandard_gamma(Shape,Value)standard_gamma(+positive_float,-float) - onestandard_normal/1
Returns a standard normally (Gaussian) distributed random value (using a default mean of 0.0 and a default deviation of 1.0).
staticstandard_normal(Value)standard_normal(-float) - oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)
See also