The following functions are provided for users who need lower overhead than that of distribution objects, such as untyped Racket users (currently), and library writers who are implementing their own distribution abstractions.
Because applying these functions is meant to be fast, none of them have optional arguments. In particular, the boolean flags log? and 1-p? are always required.
Every low-level function’s argument list begins with the distribution family parameters. In the case of pdfs and cdfs, these arguments are followed by a domain value and boolean flags. In the case of inverse cdfs, they are followed by a probability argument and boolean flags. For sampling procedures, the distribution family parameters are followed by the requested number of random samples.
Generally, prob is a probability parameter, k is an integer domain value, x is a real domain value, p is the probability argument to an inverse cdf, and n is the number of random samples.
To get delta-distributed random samples, use (make-flvector n mean).
min : Flonum max : Flonum mode : Flonum x : Flonum log? : Any
min : Flonum max : Flonum mode : Flonum x : Flonum log? : Any 1-p? : Any
min : Flonum max : Flonum mode : Flonum p : Flonum log? : Any 1-p? : Any
(fltriangle-sample min max mode n) → FlVector
min : Flonum max : Flonum mode : Flonum n : Integer