The cl-random Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-random Reference Manual

This is the cl-random Reference Manual, version 0.0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 13:58:25 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

* Introduction

cl-random is a library for (1) generating random draws from various
commonly used distributions, and (2) calculating statistical
functions, such as density, distribution and quantiles for these
distributions.

In the implementation and the interface, our primary considerations
were

1. *Correctness.*  Above everything, all calculations should be correct.
   Correctness shall not be sacrificed for speed or implementational
   simplicity.  Consequently, everything should be unit-tested all the
   time.

2. *Simple and unified interface.* Random variables are instances
   which can be used for calculations and random draws, for example,
#+BEGIN_SRC lisp
(let ((rv (r-normal 13 2)))
  (pdf rv 15d0)				; density
  (cdf rv 13d0)				; CDF
  (draw rv))				; a random draw
#+END_SRC

3. *Speed and exposed building blocks on demand.* You can obtain the
   generator function for random draws as a closure using the accessor
   "generator" from an rv.  In addition, the package exports
   independent building blocks such as draw-standard-normal, which can
   be inlined into your code if absolutely necessary.

Implementation note: Subclasses are allowed to calculate intermediate
values (eg to speed up computation) any time, eg right after the
initialization of the instance, or on demand.  The consequences or
changing the slots of RV classes are UNDEFINED, but probably quite
nasty.  Don't do it. *Note: lazy slots are currently not used, will be
reintroduced in the future after some serious profiling/benchmarking.*


* To do list

** Roadmap

1. Sketch the interface.

2. Some basic functionality.  We are currently here, eg exponential,
   normal and gamma distributions are partially implemented.

3. Keep extending the library based on user demand.

4. Optimize things on demand, see where the bottlenecks are.

** Specific planned improvements, roughly in order of priority

  - more serious testing.  I like the approach in
    [cook2006validation]: we should transform empirical quantiles to
    z-statistics and calculate the p-value using chi-square tests
  - (mm rv x) and similar methods for multivariate normal (and maybe T)

* Coding guidelines

Always try to implement state-of-the-art generation and calculation
methods.  If you need something, read up on the literature, the field
has developed a lot in the last decades, and most older books present
obsolete methods.  Good starting points are Gentle (2005) and Press et
al (2007), though you should use the latter one with care and don't
copy algorithms without reading a few recent articles, they are not
always the best ones (the authors admit this, but they claim that some
algorithms are there for pedagogical purposes).

Always document the references in the docstring, and include the full
citation in doc/references.bib (BibTeX format).

Do at least basic optimization with declarations (eg until SBCL
doesn't give a notes any more, notes about return values are OK).
Benchmarks are always welcome, and should be documented.

Document doubts and suggestions for improvements, use !! and ??, more
marks mean higher priority.

The naming convention for building blocks is something like 
(draw|cdf|pdf|quantile|...)-(standard-)?distribution-name(possible-suffix)?, eg
pdf-standard-normal or draw-standard-gamma1.



Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-random

Author

Tamas K Papp

License

MIT

Description

Random numbers and distributions.

Version

0.0.1

Dependencies
Source

cl-random.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-random.asd

Location

/home/quickbuilder/quicklisp/dists/quicklisp/software/cl-random-20150407-git/cl-random.asd

Systems

cl-random (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-random/internals.lisp

Parent

cl-random (system)

Location

internals.lisp

Packages

cl-random.internals

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl-random/package.lisp

Dependency

internals.lisp (file)

Parent

cl-random (system)

Location

package.lisp

Packages

cl-random


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 cl-random/generator.lisp

Dependency

package.lisp (file)

Parent

cl-random (system)

Location

generator.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 cl-random/simple-multiplicative-congruential-generators.lisp

Dependency

generator.lisp (file)

Parent

cl-random (system)

Location

simple-multiplicative-congruential-generators.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.6 cl-random/random.lisp

Dependency

simple-multiplicative-congruential-generators.lisp (file)

Parent

cl-random (system)

Location

random.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.7 cl-random/discrete.lisp

Dependency

random.lisp (file)

Parent

cl-random (system)

Location

discrete.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.8 cl-random/univariate.lisp

Dependency

discrete.lisp (file)

Parent

cl-random (system)

Location

univariate.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.9 cl-random/continuous-time.lisp

Dependency

univariate.lisp (file)

Parent

cl-random (system)

Location

continuous-time.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 cl-random.internals

Source

internals.lisp (file)

Use List
Used By List

cl-random

Exported Definitions

Previous: , Up: Packages   [Contents][Index]

4.2 cl-random

Source

package.lisp (file)

Nickname

rv

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: maybe-ignore-constant IGNORE-CONSTANT? VALUE CONSTANT

Handle a constant that is calculated only when IGNORE-CONSTANT? is NIL and VALUE is not negative infinity (represented by NIL).

Package

cl-random.internals

Source

internals.lisp (file)

Macro: try (&rest BINDINGS) CONDITION VALUE

Evaluate bindings (expanding into LET+, so all features can be used) until condition is satisfied, then return value.

Package

cl-random.internals

Source

internals.lisp (file)

Macro: with-floats (&rest VARIABLES) &body BODY

Rebind each variable, coerced to a the internal float type used by CL-RANDOM.

Package

cl-random.internals

Source

internals.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: as-float X

Return the argument coerced to the CL-RANDOM library’s internal float type.

Package

cl-random.internals

Source

internals.lisp (file)

Function: as-float-probabilities VECTOR

Normalize vector as probabilities, assert that all are positive, return them as a VECTOR-DOUBLE-FLOAT. Vector is always copied.

Package

cl-random.internals

Source

internals.lisp (file)

Function: as-float-vector VECTOR &key COPY?

Return VECTOR converted to another vector with elements converted to INTERNAL-FLOAT if necessary. When COPY?, the vector is always copied.

Package

cl-random.internals

Source

internals.lisp (file)

Function: distinct-random-integers COUNT LIMIT &key RNG

Return a vector of COUNT distinct random integers, in increasing order, drawn from the uniform discrete distribution on {0 , ..., limit-1}.

Package

cl-random

Source

discrete.lisp (file)

Function: distinct-random-integers-dense COUNT LIMIT &key RNG

Implementation of DISTINCT-RANDOM-INTEGERS when count/limit is (relatively) high. Implements algorithm S from @cite{taocp3}, p 142.

Package

cl-random

Source

discrete.lisp (file)

Function: draw-bernoulli P &key RNG

Return T with probability p, otherwise NIL. Rationals are handled exactly.

Package

cl-random

Source

univariate.lisp (file)

Function: draw-binomial P N &key RNG

Return the number of successes out of N Bernoulli trials with probability of success P.

Package

cl-random

Source

univariate.lisp (file)

Function: draw-exponential RATE &key RNG

Return a random variable from the Exponential(rate) distribution which has density rate*exp(-rate*x) for x>=0 and 0 for x<0. rate > 0.

Package

cl-random

Source

univariate.lisp (file)

Function: draw-geometric P &key RNG

Return the number of Bernoulli trials, with probability of success P, that were needed to reach the first success. This is >= 1.

Package

cl-random

Source

univariate.lisp (file)

Function: draw-poisson LAMDA &key RNG

Return the number of events that occur with probability LAMDA. The algorithm is from Donald E. Knuth (1969). Seminumerical Algorithms. The Art of Computer Programming, Volume 2. Addison Wesley. WARNING: It’s simple but only linear in the return value K and is numerically unstable for large LAMDA.

Package

cl-random

Source

univariate.lisp (file)

Function: draw-rayleigh SCALE &key RNG

Return a random variable from the Rayleigh(scale) distribution, where scale > 0 and density x * exp(-x^2 / (2 scale^2)) / scale^2 for x>=0 and 0 for x<0.

Package

cl-random

Source

univariate.lisp (file)

Function: draw-standard-exponential &key RNG

Return a random variable from the Exponential(1) distribution, which has density exp(-x) for x>=0 and 0 for x<0.

Package

cl-random

Source

univariate.lisp (file)

Function: draw-standard-normal &key RNG

Draw a random number from N(0,1).

Package

cl-random

Source

univariate.lisp (file)

Function: draw-standard-t NU &key RNG

Draw a standard T random variate, with NU degrees of freedom.

Package

cl-random

Source

univariate.lisp (file)

Function: draw-uniform LEFT RIGHT &key RNG

Return a random variable from the uniform distribution between LEFT and RIGHT. It’s type is the same as that of (- LEFT RIGHT).

Package

cl-random

Source

univariate.lisp (file)

Function: from-standard-normal X MU SIGMA

Scale x from standard normal.

Package

cl-random

Source

univariate.lisp (file)

Function: make-generator &key SEED TYPE

Make a random number generator object. SEED can be any of NIL, T, an other generator, an integer, or any type of seed that a generator of type TYPE supports:
- NIL: the generator’s STD-SEED is used;
- T: a random seed is used;
- a generator: a clone is returned;
- otherwise: SEED is used as depends on the generator.

Package

cl-random

Source

generator.lisp (file)

Function: next LIMIT &optional RNG

Generates a uniformly distributed pseudo-random number greater than or equal to zero and less than LIMIT. RNG, if supplied, is the random generator to use.

Package

cl-random

Source

generator.lisp (file)

Function: pdf RV X &optional IGNORE-CONSTANT?

Probability distribution function of RANDOM-VARIABLE at X. See LOG-PDF for the semantics of IGNORE-CONSTANT?.

Package

cl-random

Source

random.lisp (file)

Function: r-bernoulli PR
Package

cl-random

Source

univariate.lisp (file)

Function: r-beta ALPHA BETA
Package

cl-random

Source

univariate.lisp (file)

Function: r-binomial PR N
Package

cl-random

Source

univariate.lisp (file)

Function: r-chi-square NU

Chi-square distribution with NU degrees of freedom.

Package

cl-random

Source

univariate.lisp (file)

Function: r-discrete PROBABILITIES
Package

cl-random

Source

univariate.lisp (file)

Function: r-exponential RATE
Package

cl-random

Source

univariate.lisp (file)

Function: r-gamma ALPHA BETA
Package

cl-random

Source

univariate.lisp (file)

Function: r-geometric PR
Package

cl-random

Source

univariate.lisp (file)

Function: r-inverse-chi-square NU &optional S^2

Generalized inverse chi-square distribution. Reparametrized to INVERSE-GAMMA.

Package

cl-random

Source

univariate.lisp (file)

Function: r-inverse-gamma ALPHA BETA
Package

cl-random

Source

univariate.lisp (file)

Function: r-log-normal LOG-MEAN LOG-SD
Package

cl-random

Source

univariate.lisp (file)

Function: r-normal &optional MEAN VARIANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-rayleigh SCALE
Package

cl-random

Source

univariate.lisp (file)

Function: r-t MEAN SCALE NU
Package

cl-random

Source

univariate.lisp (file)

Function: r-truncated-normal LEFT RIGHT &optional MU SIGMA

Truncated normal distribution. If LEFT or RIGHT is NIL, it corresponds to -/+ infinity.

Package

cl-random

Source

univariate.lisp (file)

Function: r-uniform LEFT RIGHT
Package

cl-random

Source

univariate.lisp (file)

Function: r-uniformized-markov-jump RATES &key TRANSITION-RATE KEYS NO-CHANGE
Package

cl-random

Source

continuous-time.lisp (file)

Function: t-scale-to-variance-coefficient NU

Return the coefficient that multiplies the Sigma matrix or the squared scale to get the variance of a (multivariate) Student-T distribution. Also checks that nu > 2, ie the variance is defined.

Package

cl-random

Source

univariate.lisp (file)

Function: to-standard-normal X MU SIGMA

Scale x to standard normal.

Package

cl-random

Source

univariate.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: alpha R-GAMMA0
Package

cl-random

Methods
Method: alpha (R-BETA0 r-beta)
Source

univariate.lisp (file)

Method: alpha (R-INVERSE-GAMMA0 r-inverse-gamma)
Source

univariate.lisp (file)

Method: alpha (R-GAMMA0 r-gamma)
Source

univariate.lisp (file)

Generic Function: beta R-GAMMA0
Package

cl-random

Methods
Method: beta (R-BETA0 r-beta)
Source

univariate.lisp (file)

Method: beta (R-INVERSE-GAMMA0 r-inverse-gamma)
Source

univariate.lisp (file)

Method: beta (R-GAMMA0 r-gamma)
Source

univariate.lisp (file)

Generic Function: cdf RANDOM-VARIABLE X

Cumulative distribution function of RANDOM-VARIABLE at X.

Package

cl-random

Source

random.lisp (file)

Methods
Method: cdf (R-BERNOULLI0 r-bernoulli) X
Source

univariate.lisp (file)

Method: cdf (INSTANCE r-discrete) I
Source

univariate.lisp (file)

Method: cdf (R-RAYLEIGH0 r-rayleigh) X
Source

univariate.lisp (file)

Method: cdf (R-GAMMA0 r-gamma) X
Source

univariate.lisp (file)

Method: cdf (R-LOG-NORMAL0 r-log-normal) X
Source

univariate.lisp (file)

Method: cdf (LEFT-TRUNCATED-NORMAL0 left-truncated-normal) X
Source

univariate.lisp (file)

Method: cdf (R-NORMAL0 r-normal) X
Source

univariate.lisp (file)

Method: cdf (R-EXPONENTIAL0 r-exponential) X
Source

univariate.lisp (file)

Method: cdf (R-UNIFORM0 r-uniform) X
Source

univariate.lisp (file)

Generic Function: draw RANDOM-VARIABLE &key RNG &allow-other-keys

Draw random variates. Can also be used on generators.

Package

cl-random

Source

random.lisp (file)

Methods
Method: draw (R-UNIFORMIZED-MARKOV-JUMP0 r-uniformized-markov-jump) &key
Source

continuous-time.lisp (file)

Method: draw (R-GEOMETRIC0 r-geometric) &key RNG
Source

univariate.lisp (file)

Method: draw (R-BINOMIAL0 r-binomial) &key RNG
Source

univariate.lisp (file)

Method: draw (R-BERNOULLI0 r-bernoulli) &key RNG
Source

univariate.lisp (file)

Method: draw (INSTANCE r-discrete) &key RNG
Source

univariate.lisp (file)

Method: draw (R-RAYLEIGH0 r-rayleigh) &key RNG
Source

univariate.lisp (file)

Method: draw (R-BETA0 r-beta) &key RNG
Source

univariate.lisp (file)

Method: draw (R-INVERSE-GAMMA0 r-inverse-gamma) &key RNG
Source

univariate.lisp (file)

Method: draw (R-GAMMA0 r-gamma) &key RNG
Source

univariate.lisp (file)

Method: draw (R-T0 r-t) &key RNG
Source

univariate.lisp (file)

Method: draw (R-LOG-NORMAL0 r-log-normal) &key RNG
Source

univariate.lisp (file)

Method: draw (LEFT-TRUNCATED-NORMAL0 left-truncated-normal) &key RNG
Source

univariate.lisp (file)

Method: draw (R-NORMAL0 r-normal) &key RNG
Source

univariate.lisp (file)

Method: draw (R-EXPONENTIAL0 r-exponential) &key RNG
Source

univariate.lisp (file)

Method: draw (R-UNIFORM0 r-uniform) &key RNG
Source

univariate.lisp (file)

Method: draw (FUNCTION function) &key RNG
Generic Function: generator RANDOM-VARIABLE &key RNG

Return a closure that returns random draws.

Package

cl-random

Source

random.lisp (file)

Methods
Method: generator RANDOM-VARIABLE &key RNG
Generic Function: left R-UNIFORM0
Package

cl-random

Methods
Method: left (R-UNIFORM0 r-uniform)
Source

univariate.lisp (file)

Generic Function: log-pdf RANDOM-VARIABLE X &optional IGNORE-CONSTANT?

Log of probability distribution function of RANDOM-VARIABLE at X. NIL corresponds to log(-infinity). When IGNORE-CONSTANT?, the result may be shifted by an arbitrary real constant that does not change between calls of the same RANDOM-VARIABLE. This may save computation, and is useful for MCMC methods, etc.

Package

cl-random

Source

random.lisp (file)

Methods
Method: log-pdf (INSTANCE r-discrete) I &optional IGNORE-CONSTANT?
Source

univariate.lisp (file)

Method: log-pdf (R-INVERSE-GAMMA0 r-inverse-gamma) X &optional IGNORE-CONSTANT?
Source

univariate.lisp (file)

Method: log-pdf (R-GAMMA0 r-gamma) X &optional IGNORE-CONSTANT?
Source

univariate.lisp (file)

Method: log-pdf (R-LOG-NORMAL0 r-log-normal) X &optional IGNORE-CONSTANT?
Source

univariate.lisp (file)

Method: log-pdf (LEFT-TRUNCATED-NORMAL0 left-truncated-normal) X &optional IGNORE-CONSTANT?
Source

univariate.lisp (file)

Method: log-pdf (R-NORMAL0 r-normal) X &optional IGNORE-CONSTANT?
Source

univariate.lisp (file)

Method: log-pdf (R-EXPONENTIAL0 r-exponential) X &optional IGNORE-CONSTANT?
Source

univariate.lisp (file)

Method: log-pdf (R-UNIFORM0 r-uniform) X &optional IGNORE-CONSTANT?
Source

univariate.lisp (file)

Generic Function: mean RANDOM-VARIABLE

Mean of random variable.

Package

cl-random

Source

random.lisp (file)

Methods
Method: mean (R-GEOMETRIC0 r-geometric)
Source

univariate.lisp (file)

Method: mean (R-BINOMIAL0 r-binomial)
Source

univariate.lisp (file)

Method: mean (R-BERNOULLI0 r-bernoulli)
Source

univariate.lisp (file)

Method: mean (INSTANCE r-discrete)
Source

univariate.lisp (file)

Method: mean (R-RAYLEIGH0 r-rayleigh)
Source

univariate.lisp (file)

Method: mean (R-BETA0 r-beta)
Source

univariate.lisp (file)

Method: mean (R-INVERSE-GAMMA0 r-inverse-gamma)
Source

univariate.lisp (file)

Method: mean (R-GAMMA0 r-gamma)
Source

univariate.lisp (file)

Method: mean (R-T0 r-t)
Source

univariate.lisp (file)

Method: mean (R-LOG-NORMAL0 r-log-normal)
Source

univariate.lisp (file)

Method: mean (LEFT-TRUNCATED-NORMAL0 left-truncated-normal)
Source

univariate.lisp (file)

Method: mean (R-NORMAL0 r-normal)
Source

univariate.lisp (file)

Method: mean (R-EXPONENTIAL0 r-exponential)
Source

univariate.lisp (file)

Method: mean (R-UNIFORM0 r-uniform)
Source

univariate.lisp (file)

Generic Function: nu DISTRIBUTION

Return the degrees of freedom when applicable.

Package

cl-random

Source

univariate.lisp (file)

Methods
Method: nu (R-INVERSE-GAMMA r-inverse-gamma)
Method: nu (R-GAMMA r-gamma)
Method: nu (R-T0 r-t)
Generic Function: probabilities INSTANCE
Package

cl-random

Methods
Method: probabilities (INSTANCE r-discrete)
Source

univariate.lisp (file)

Generic Function: quantile RANDOM-VARIABLE Q

Quantile of RANDOM-VARIABLE at Q.

Package

cl-random

Source

univariate.lisp (file)

Methods
Method: quantile (R-BETA0 r-beta) Q
Method: quantile (R-GAMMA0 r-gamma) Q
Method: quantile (R-LOG-NORMAL0 r-log-normal) Q
Method: quantile (LEFT-TRUNCATED-NORMAL0 left-truncated-normal) Q
Method: quantile (R-NORMAL0 r-normal) Q
Method: quantile (R-EXPONENTIAL0 r-exponential) P
Method: quantile (R-UNIFORM0 r-uniform) P
Generic Function: rate R-EXPONENTIAL0
Package

cl-random

Methods
Method: rate (R-EXPONENTIAL0 r-exponential)
Source

univariate.lisp (file)

Generic Function: right R-UNIFORM0
Package

cl-random

Methods
Method: right (R-UNIFORM0 r-uniform)
Source

univariate.lisp (file)

Generic Function: scale R-T0
Package

cl-random

Methods
Method: scale (R-RAYLEIGH0 r-rayleigh)
Source

univariate.lisp (file)

Method: scale (R-T0 r-t)
Source

univariate.lisp (file)

Generic Function: standard-deviation RANDOM-VARIABLE

Standard deviation of random variable.

Package

cl-random

Source

univariate.lisp (file)

Methods
Method: standard-deviation (RANDOM-VARIABLE r-univariate)
Generic Function: variance RANDOM-VARIABLE

Variance of random variable.

Package

cl-random

Source

random.lisp (file)

Methods
Method: variance (R-GEOMETRIC0 r-geometric)
Source

univariate.lisp (file)

Method: variance (R-BINOMIAL0 r-binomial)
Source

univariate.lisp (file)

Method: variance (R-BERNOULLI0 r-bernoulli)
Source

univariate.lisp (file)

Method: variance (INSTANCE r-discrete)
Source

univariate.lisp (file)

Method: variance (R-RAYLEIGH0 r-rayleigh)
Source

univariate.lisp (file)

Method: variance (R-BETA0 r-beta)
Source

univariate.lisp (file)

Method: variance (R-INVERSE-GAMMA0 r-inverse-gamma)
Source

univariate.lisp (file)

Method: variance (R-GAMMA0 r-gamma)
Source

univariate.lisp (file)

Method: variance (R-T0 r-t)
Source

univariate.lisp (file)

Method: variance (R-LOG-NORMAL0 r-log-normal)
Source

univariate.lisp (file)

Method: variance (LEFT-TRUNCATED-NORMAL0 left-truncated-normal)
Source

univariate.lisp (file)

Method: variance (R-NORMAL0 r-normal)
Source

univariate.lisp (file)

Method: variance (R-EXPONENTIAL0 r-exponential)
Source

univariate.lisp (file)

Method: variance (R-UNIFORM0 r-uniform)
Source

univariate.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Structures

Structure: r-bernoulli ()

Bernoulli(pr) distribution, with probability PR for success and 1-PR for failure.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: pr
Type

cl-random.internals:internal-float

Readers

r-bernoulli-pr (function)

Writers

(setf r-bernoulli-pr) (function)

Structure: r-beta ()

Beta(alpha,beta) distribution, with density proportional to x^(alpha-1)*(1-x)^(beta-1).

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: alpha
Type

cl-random.internals:internal-float

Readers

r-beta-alpha (function)

Writers

(setf r-beta-alpha) (function)

Slot: beta
Type

cl-random.internals:internal-float

Readers

r-beta-beta (function)

Writers

(setf r-beta-beta) (function)

Structure: r-binomial ()

Binomial(pr,n) distribution, with N Bernoulli trials with probability PR for success.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: pr
Type

cl-random.internals:internal-float

Readers

r-binomial-pr (function)

Writers

(setf r-binomial-pr) (function)

Slot: n
Type

integer

Readers

r-binomial-n (function)

Writers

(setf r-binomial-n) (function)

Structure: r-discrete ()

Discrete probabilities.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: probabilities
Type

cl-random.internals:float-vector

Readers

r-discrete-probabilities (function)

Writers

(setf r-discrete-probabilities) (function)

Slot: prob
Type

cl-random.internals:float-vector

Readers

r-discrete-prob (function)

Writers

(setf r-discrete-prob) (function)

Slot: alias
Type

(simple-array fixnum (*))

Readers

r-discrete-alias (function)

Writers

(setf r-discrete-alias) (function)

Slot: n-float
Type

cl-random.internals:internal-float

Readers

r-discrete-n-float (function)

Writers

(setf r-discrete-n-float) (function)

Structure: r-exponential ()

Exponential(rate) distribution, with density rate*exp(-rate*x) for x>=0 and 0 for x<0. rate > 0.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: rate
Type

cl-random.internals:internal-float

Readers

r-exponential-rate (function)

Writers

(setf r-exponential-rate) (function)

Structure: r-gamma ()

Gamma(alpha,beta) distribution, with density proportional to x^(alpha-1) exp(-x*beta). Alpha and beta are known as shape and inverse scale (or rate) parameters, respectively.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: alpha
Type

cl-random.internals:internal-float

Readers

r-gamma-alpha (function)

Writers

(setf r-gamma-alpha) (function)

Slot: beta
Type

cl-random.internals:internal-float

Readers

r-gamma-beta (function)

Writers

(setf r-gamma-beta) (function)

Structure: r-geometric ()

Geometric(pr) distribution.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: pr
Type

cl-random.internals:internal-float

Readers

r-geometric-pr (function)

Writers

(setf r-geometric-pr) (function)

Structure: r-inverse-gamma ()

Inverse-Gamma(alpha,beta) distribution, with density p(x) proportional to x^(-alpha+1) exp(-beta/x)

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: alpha
Type

cl-random.internals:internal-float

Readers

r-inverse-gamma-alpha (function)

Writers

(setf r-inverse-gamma-alpha) (function)

Slot: beta
Type

cl-random.internals:internal-float

Readers

r-inverse-gamma-beta (function)

Writers

(setf r-inverse-gamma-beta) (function)

Structure: r-log-normal ()

Log-normal distribution with location log-mean and scale log-sd.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: log-mean
Type

cl-random.internals:internal-float

Readers

r-log-normal-log-mean (function)

Writers

(setf r-log-normal-log-mean) (function)

Slot: log-sd
Type

cl-random.internals:internal-float

Readers

r-log-normal-log-sd (function)

Writers

(setf r-log-normal-log-sd) (function)

Structure: r-normal ()

Normal(mean,variance) distribution.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: mean
Type

cl-random.internals:internal-float

Readers

r-normal-mean (function)

Writers

(setf r-normal-mean) (function)

Slot: sd
Type

cl-random.internals:internal-float

Readers

r-normal-sd (function)

Writers

(setf r-normal-sd) (function)

Structure: r-rayleigh ()

Rayleigh(scale) distribution with scale > 0 and density x * exp(-x^2 / (2 scale^2)) / scale^2 for x>=0 and 0 for x<0.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: scale
Type

cl-random.internals:internal-float

Readers

r-rayleigh-scale (function)

Writers

(setf r-rayleigh-scale) (function)

Structure: r-t ()

T(mean,scale,nu) random variate.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: mean
Type

cl-random.internals:internal-float

Readers

r-t-mean (function)

Writers

(setf r-t-mean) (function)

Slot: scale
Type

cl-random.internals:internal-float

Readers

r-t-scale (function)

Writers

(setf r-t-scale) (function)

Slot: nu
Type

cl-random.internals:internal-float

Readers

r-t-nu (function)

Writers

(setf r-t-nu) (function)

Structure: r-uniform ()

Uniform(left,right) distribution.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: left
Type

cl-random.internals:internal-float

Readers

r-uniform-left (function)

Writers

(setf r-uniform-left) (function)

Slot: right
Type

cl-random.internals:internal-float

Readers

r-uniform-right (function)

Writers

(setf r-uniform-right) (function)

Slot: width
Type

cl-random.internals:internal-float

Readers

r-uniform-width (function)

Writers

(setf r-uniform-width) (function)

Structure: r-uniformized-markov-jump ()

Define a random variable for uniformized markov jumps,
which returns two values: the time spent in the state, and the index of the next state (or the corresponding element in KEYS, which is a vector of the same length). TRANSITION-RATES defaults to the sum of keys, however, it can be specified to be larger, in which case the markov chain may remain in the same state and return NO-CHANGE as the second value. Defines features DURATION and JUMP, which return the two underlying random variables.

Package

cl-random

Source

continuous-time.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: duration
Readers

r-uniformized-markov-jump-duration (function)

Writers

(setf r-uniformized-markov-jump-duration) (function)

Slot: jump
Readers

r-uniformized-markov-jump-jump (function)

Writers

(setf r-uniformized-markov-jump-jump) (function)

Slot: no-change
Readers

r-uniformized-markov-jump-no-change (function)

Writers

(setf r-uniformized-markov-jump-no-change) (function)

Slot: n
Type

fixnum

Readers

r-uniformized-markov-jump-n (function)

Writers

(setf r-uniformized-markov-jump-n) (function)

Slot: keys
Type

(or null vector)

Readers

r-uniformized-markov-jump-keys (function)

Writers

(setf r-uniformized-markov-jump-keys) (function)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.5 Classes

Class: borosh13 ()

Donald E. Knuth’s Borosh-Niederreiter, The Art of Computer Programming, Volume 2, Third Edition, Addison-Wesley, pp 106-108.

Package

cl-random

Source

simple-multiplicative-congruential-generators.lisp (file)

Direct superclasses

simple-multiplicative-congruential (class)

Direct slots
Slot: a
Initform

1812433253

Slot: chunk-length
Initform

32

Class: generator ()

Base class for random number generators.

Package

cl-random

Source

generator.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

simple-multiplicative-congruential (class)

Direct methods
Direct slots
Slot: state

All information needed by the generator to create the next chunk
of random bits. This state is modified after each call to NEXT-CHUNK.

Initargs

:state

Readers

state (generic function)

Writers

(setf state) (generic function)

Slot: min

The minimum value return by NEXT-CHUNK.

Initargs

:min

Slot: max

The maximum value return by NEXT-CHUNK.

Initargs

:max

Slot: chunk-length

The length in bits of the integer returned by NEXT-CHUNK.

Readers

chunk-length (generic function)

Slot: default-seed

The seed used by default, when the seed is NIL.

Initform

0

Readers

default-seed (generic function)

Class: randu ()

The poor IBM randu generator. Park and Miller, Random Number
Generators: Good ones are hard to find, Communications of the ACM, October 1988, Volume 31, No 10, pp 1192-1201.

Package

cl-random

Source

simple-multiplicative-congruential-generators.lisp (file)

Direct superclasses

simple-multiplicative-congruential (class)

Direct slots
Slot: a
Initform

65539

Slot: chunk-length
Initform

31

Class: transputer ()

INMOS Transputer Development System generator.

Package

cl-random

Source

simple-multiplicative-congruential-generators.lisp (file)

Direct superclasses

simple-multiplicative-congruential (class)

Direct slots
Slot: a
Initform

1664525

Slot: chunk-length
Initform

32

Class: waterman14 ()

Donald E. Knuth’s Waterman, The Art of Computer Programming, Volume 2, Third Edition, Addison-Wesley, pp 106-108.

Package

cl-random

Source

simple-multiplicative-congruential-generators.lisp (file)

Direct superclasses

simple-multiplicative-congruential (class)

Direct slots
Slot: a
Initform

1566083941

Slot: chunk-length
Initform

32


Previous: , Up: Exported definitions   [Contents][Index]

5.1.6 Types

Type: float-vector &optional N
Package

cl-random.internals

Source

internals.lisp (file)

Type: internal-float &optional LOWER-LIMIT UPPER-LIMIT

Type used for internal representation of floats in the CL-RANDOM library.

Package

cl-random.internals

Source

internals.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +normal-log-pdf-constant+

Normalizing constant for a standard normal PDF.

Package

cl-random

Source

univariate.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Special variables

Special Variable: *default-generator-type*
Package

cl-random

Source

generator.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Macros

Macro: define-rv NAME CONSTRUCTOR-LAMBDA-LIST OPTIONS SLOTS CONSTRUCTOR-FORM &rest METHODS

Define a random variable, abstracting from the representation. Syntax:

NAME is a symbol, and will name the class and the creation function.

CONSTRUCTOR-LAMBDA-LIST will be used to wrap the CONSTRUCTOR-FORM, which can use the locally define macro (MAKE :slot-name value1 ...) to initialize slots.

SLOTS is a list of (slot-name &key type read-only reader) slot specifications. When READER is T, SLOT-NAME is used instead, otherwise a method is defined using the given symbol.

OPTIONS is (&key documentation instance), the default instance is a gensym.

METHODS are (function-name lambda-list &body body), with (INSTANCE NAME) prepended to the lambda-list, ie the instance is accessible using INSTANCE. Also, within BODY, slots are accessible by their names.

Package

cl-random

Source

random.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Functions

Function: %next-double-float LIMIT RNG

Handle the single or double float case of RANDOM. We generate a float in [0d0, 1d0) by clobbering the mantissa of 1d0 with random bits (52 bits); this yields a number in [1d0, 2d0). Then 1d0 is subtracted.

Package

cl-random

Source

generator.lisp (file)

Function: %next-integer LIMIT RNG

Generates an integer greater than or equal to zero and less than LIMIT. Successive chunks are concatenated without overlap to construct integers larger than a single chunk. The return value has this property: If two integers are generated from the same RNG with LIMIT equal to 2^m and 2^n, respectively, then bit k is the same in both integers for 0 <= k < min(m,n). Each call to %NEXT-INTEGER consumes at least one chunk; bits left over from previous chunks are not re-used.

Package

cl-random

Source

generator.lisp (file)

Function: %next-single-float LIMIT RNG

Handle the single or double float case of RANDOM. We generate a float in [0f0, 1f0) by clobbering the mantissa of 1f0 with random bits (23 bits); this yields a number in [1f0, 2f0). Then 1f0 is subtracted.

Package

cl-random

Source

generator.lisp (file)

Function: cdf-normal% X MEAN SD

Internal function for normal CDF.

Package

cl-random

Source

univariate.lisp (file)

Function: check-probability P &optional OPEN

Assert that P is a probability (ie a real number between 0 and 1). When OPEN is given, it is checked that p is not 0 (:LEFT), 1 (:RIGHT), or 0/1 (:BOTH).

Package

cl-random

Source

random.lisp (file)

Function: copy-left-truncated-normal INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-bernoulli INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-beta INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-binomial INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-discrete INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-exponential INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-gamma INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-geometric INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-inverse-gamma INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-log-normal INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-normal INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-rayleigh INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-t INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-uniform INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: copy-r-uniformized-markov-jump INSTANCE
Package

cl-random

Source

continuous-time.lisp (file)

Function: copy-r-univariate INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: draw-bernoulli-bit P &key RNG
Package

cl-random

Source

univariate.lisp (file)

Function: draw-left-truncated-standard-normal LEFT ALPHA &key RNG

Draw a left truncated standard normal, using an Exp(alpha,left) distribution. LEFT is the standardized boundary, ALPHA should be calculated with TRUNCATED-NORMAL-OPTIMAL-ALPHA.

Package

cl-random

Source

univariate.lisp (file)

Function: draw-standard-gamma1 ALPHA D C &key RNG

Return a standard gamma variate (beta=1) with shape parameter alpha >= 1. See Marsaglia and Tsang (2004). You should precalculate d and c using the utility function above.

Package

cl-random

Source

univariate.lisp (file)

Function: generate-seed ()

Return a 64-bit random seed, based on current time.

Package

cl-random

Source

generator.lisp (file)

Function: left-truncated-normal MU SIGMA LEFT
Package

cl-random

Source

univariate.lisp (file)

Function: left-truncated-normal-alpha INSTANCE
Function: (setf left-truncated-normal-alpha) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: left-truncated-normal-left INSTANCE
Function: (setf left-truncated-normal-left) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: left-truncated-normal-left-standardized INSTANCE
Function: (setf left-truncated-normal-left-standardized) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: left-truncated-normal-m0 INSTANCE
Function: (setf left-truncated-normal-m0) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: left-truncated-normal-mu INSTANCE
Function: (setf left-truncated-normal-mu) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: left-truncated-normal-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: left-truncated-normal-sigma INSTANCE
Function: (setf left-truncated-normal-sigma) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: log-gamma ALPHA

Log gamma function.

Package

cl-random

Source

univariate.lisp (file)

Function: make-left-truncated-normal &key (MU MU) (SIGMA SIGMA) (LEFT LEFT) (LEFT-STANDARDIZED LEFT-STANDARDIZED) (M0 M0) (ALPHA ALPHA)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-bernoulli &key (PR PR)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-beta &key (ALPHA ALPHA) (BETA BETA)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-binomial &key (PR PR) (N N)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-discrete &key (PROBABILITIES PROBABILITIES) (PROB PROB) (ALIAS ALIAS) (N-FLOAT N-FLOAT)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-exponential &key (RATE RATE)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-gamma &key (ALPHA ALPHA) (BETA BETA)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-geometric &key (PR PR)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-inverse-gamma &key (ALPHA ALPHA) (BETA BETA)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-log-normal &key (LOG-MEAN LOG-MEAN) (LOG-SD LOG-SD)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-normal &key (MEAN MEAN) (SD SD)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-rayleigh &key (SCALE SCALE)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-t &key (MEAN MEAN) (SCALE SCALE) (NU NU)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-uniform &key (LEFT LEFT) (RIGHT RIGHT) (WIDTH WIDTH)
Package

cl-random

Source

univariate.lisp (file)

Function: make-r-uniformized-markov-jump &key (DURATION DURATION) (JUMP JUMP) (NO-CHANGE NO-CHANGE) (N N) (KEYS KEYS)
Package

cl-random

Source

continuous-time.lisp (file)

Function: make-r-univariate &key
Package

cl-random

Source

univariate.lisp (file)

Function: quantile-normal% Q MEAN SD

Internal function for normal quantile.

Package

cl-random

Source

univariate.lisp (file)

Function: r-bernoulli-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-bernoulli-pr INSTANCE
Function: (setf r-bernoulli-pr) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-beta-alpha INSTANCE
Function: (setf r-beta-alpha) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-beta-beta INSTANCE
Function: (setf r-beta-beta) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-beta-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-binomial-n INSTANCE
Function: (setf r-binomial-n) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-binomial-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-binomial-pr INSTANCE
Function: (setf r-binomial-pr) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-discrete-alias INSTANCE
Function: (setf r-discrete-alias) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-discrete-n-float INSTANCE
Function: (setf r-discrete-n-float) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-discrete-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-discrete-prob INSTANCE
Function: (setf r-discrete-prob) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-discrete-probabilities INSTANCE
Function: (setf r-discrete-probabilities) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-exponential-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-exponential-rate INSTANCE
Function: (setf r-exponential-rate) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-gamma-alpha INSTANCE
Function: (setf r-gamma-alpha) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-gamma-beta INSTANCE
Function: (setf r-gamma-beta) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-gamma-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-geometric-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-geometric-pr INSTANCE
Function: (setf r-geometric-pr) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-inverse-gamma-alpha INSTANCE
Function: (setf r-inverse-gamma-alpha) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-inverse-gamma-beta INSTANCE
Function: (setf r-inverse-gamma-beta) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-inverse-gamma-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-log-normal-log-mean INSTANCE
Function: (setf r-log-normal-log-mean) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-log-normal-log-sd INSTANCE
Function: (setf r-log-normal-log-sd) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-log-normal-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-normal-mean INSTANCE
Function: (setf r-normal-mean) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-normal-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-normal-sd INSTANCE
Function: (setf r-normal-sd) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-rayleigh-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-rayleigh-scale INSTANCE
Function: (setf r-rayleigh-scale) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-t-mean INSTANCE
Function: (setf r-t-mean) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-t-nu INSTANCE
Function: (setf r-t-nu) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-t-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-t-scale INSTANCE
Function: (setf r-t-scale) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-uniform-left INSTANCE
Function: (setf r-uniform-left) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-uniform-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: r-uniform-right INSTANCE
Function: (setf r-uniform-right) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-uniform-width INSTANCE
Function: (setf r-uniform-width) VALUE INSTANCE
Package

cl-random

Source

univariate.lisp (file)

Function: r-uniformized-markov-jump-duration INSTANCE
Function: (setf r-uniformized-markov-jump-duration) VALUE INSTANCE
Package

cl-random

Source

continuous-time.lisp (file)

Function: r-uniformized-markov-jump-jump INSTANCE
Function: (setf r-uniformized-markov-jump-jump) VALUE INSTANCE
Package

cl-random

Source

continuous-time.lisp (file)

Function: r-uniformized-markov-jump-keys INSTANCE
Function: (setf r-uniformized-markov-jump-keys) VALUE INSTANCE
Package

cl-random

Source

continuous-time.lisp (file)

Function: r-uniformized-markov-jump-n INSTANCE
Function: (setf r-uniformized-markov-jump-n) VALUE INSTANCE
Package

cl-random

Source

continuous-time.lisp (file)

Function: r-uniformized-markov-jump-no-change INSTANCE
Function: (setf r-uniformized-markov-jump-no-change) VALUE INSTANCE
Package

cl-random

Source

continuous-time.lisp (file)

Function: r-uniformized-markov-jump-p OBJECT
Package

cl-random

Source

continuous-time.lisp (file)

Function: r-univariate-p OBJECT
Package

cl-random

Source

univariate.lisp (file)

Function: standard-gamma1-d-c ALPHA

Return precalculated constants (values d c), useful for drawing from a gamma distribution.

Package

cl-random

Source

univariate.lisp (file)

Function: truncated-normal-moments% N MU SIGMA LEFT RIGHT &optional M0

N=0 gives the total mass of the truncated normal, used for normalization,
N=1 the mean, and N=2 the variance. where p(x) is the normal density. When LEFT or RIGHT are NIL, they are taken to be - or + infinity, respectively. M0 may be provided for efficiency if would be calculated multiple times. The formulas are from Jawitz (2004).

Package

cl-random

Source

univariate.lisp (file)

Function: truncated-normal-optimal-alpha LEFT

Calculate optimal exponential parameter for left-truncated normals. LEFT is the standardized boundary.

Package

cl-random

Source

univariate.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.5 Generic functions

Generic Function: a OBJECT
Package

cl-random

Methods
Method: a (SIMPLE-MULTIPLICATIVE-CONGRUENTIAL simple-multiplicative-congruential)

The multiplier of the sequence x(n+1) = A * x(n) mod M.

Source

simple-multiplicative-congruential-generators.lisp (file)

Generic Function: chunk-length OBJECT
Package

cl-random

Methods
Method: chunk-length (GENERATOR generator)

The length in bits of the integer returned by NEXT-CHUNK.

Source

generator.lisp (file)

Generic Function: clone SELF
Package

cl-random

Methods
Method: clone (SELF simple-multiplicative-congruential)
Source

simple-multiplicative-congruential-generators.lisp (file)

Generic Function: default-seed OBJECT
Package

cl-random

Methods
Method: default-seed (GENERATOR generator)

The seed used by default, when the seed is NIL.

Source

generator.lisp (file)

Generic Function: duration R-UNIFORMIZED-MARKOV-JUMP0
Package

cl-random

Methods
Method: duration (R-UNIFORMIZED-MARKOV-JUMP0 r-uniformized-markov-jump)
Source

continuous-time.lisp (file)

Generic Function: generate-state RNG SEED

Return a state for a generator of RNG’s type using seed.

Package

cl-random

Source

generator.lisp (file)

Methods
Method: generate-state (SELF simple-multiplicative-congruential) SEED
Source

simple-multiplicative-congruential-generators.lisp (file)

Method: generate-state (RNG generator) SEED
Generic Function: jump R-UNIFORMIZED-MARKOV-JUMP0
Package

cl-random

Methods
Method: jump (R-UNIFORMIZED-MARKOV-JUMP0 r-uniformized-markov-jump)
Source

continuous-time.lisp (file)

Generic Function: m OBJECT
Package

cl-random

Methods
Method: m (SIMPLE-MULTIPLICATIVE-CONGRUENTIAL simple-multiplicative-congruential)

The modulo of the sequence x(n+1) = A * x(n) mod M.

Source

simple-multiplicative-congruential-generators.lisp (file)

Generic Function: n R-BINOMIAL0
Package

cl-random

Methods
Method: n (R-BINOMIAL0 r-binomial)
Source

univariate.lisp (file)

Generic Function: next-chunk SELF
Package

cl-random

Methods
Method: next-chunk (SELF simple-multiplicative-congruential)
Source

simple-multiplicative-congruential-generators.lisp (file)

Generic Function: next-real SELF
Package

cl-random

Methods
Method: next-real (SELF simple-multiplicative-congruential)
Source

simple-multiplicative-congruential-generators.lisp (file)

Generic Function: pr R-BERNOULLI0
Package

cl-random

Methods
Method: pr (R-GEOMETRIC0 r-geometric)
Source

univariate.lisp (file)

Method: pr (R-BINOMIAL0 r-binomial)
Source

univariate.lisp (file)

Method: pr (R-BERNOULLI0 r-bernoulli)
Source

univariate.lisp (file)

Generic Function: s^2 DISTRIBUTION

Return the scale when applicable.

Package

cl-random

Source

univariate.lisp (file)

Methods
Method: s^2 (R-INVERSE-GAMMA r-inverse-gamma)
Generic Function: sd R-NORMAL0
Package

cl-random

Methods
Method: sd (R-NORMAL0 r-normal)
Source

univariate.lisp (file)

Generic Function: state OBJECT
Generic Function: (setf state) NEW-VALUE OBJECT
Package

cl-random

Methods
Method: state (GENERATOR generator)
Method: (setf state) NEW-VALUE (GENERATOR generator)

All information needed by the generator to create the next chunk
of random bits. This state is modified after each call to NEXT-CHUNK.

Source

generator.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.6 Structures

Structure: left-truncated-normal ()

Truncated normal distribution with given mu and sigma (corresponds to the mean and standard deviation in the untruncated case, respectively), on the interval [left, infinity).

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

r-univariate (structure)

Direct methods
Direct slots
Slot: mu
Type

cl-random.internals:internal-float

Readers

left-truncated-normal-mu (function)

Writers

(setf left-truncated-normal-mu) (function)

Slot: sigma
Type

cl-random.internals:internal-float

Readers

left-truncated-normal-sigma (function)

Writers

(setf left-truncated-normal-sigma) (function)

Slot: left
Type

cl-random.internals:internal-float

Readers

left-truncated-normal-left (function)

Writers

(setf left-truncated-normal-left) (function)

Slot: left-standardized
Type

cl-random.internals:internal-float

Readers

left-truncated-normal-left-standardized (function)

Writers

(setf left-truncated-normal-left-standardized) (function)

Slot: m0
Type

cl-random.internals:internal-float

Readers

left-truncated-normal-m0 (function)

Writers

(setf left-truncated-normal-m0) (function)

Slot: alpha
Type

cl-random.internals:internal-float

Readers

left-truncated-normal-alpha (function)

Writers

(setf left-truncated-normal-alpha) (function)

Structure: r-univariate ()

Univariate distribution.

Package

cl-random

Source

univariate.lisp (file)

Direct superclasses

structure-object (structure)

Direct subclasses
Direct methods

standard-deviation (method)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.7 Classes

Class: simple-multiplicative-congruential ()

A multiplicative congruential generator generates the sequence x(n+1) =
A * x(n) mod M and uses the seed as x(1). A simple multiplicative congruential generator is a multiplicative congruential generator with M a power of 2. This allows to implement the modulo operation as a bitwise and operation of M-1, which is also the maximum value of a random chunk.

Package

cl-random

Source

simple-multiplicative-congruential-generators.lisp (file)

Direct superclasses

generator (class)

Direct subclasses
Direct methods
Direct slots
Slot: default-seed
Initform

1

Slot: a

The multiplier of the sequence x(n+1) = A * x(n) mod M.

Readers

a (generic function)

Slot: m

The modulo of the sequence x(n+1) = A * x(n) mod M.

Readers

m (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-random.asd: The cl-random<dot>asd file
cl-random/continuous-time.lisp: The cl-random/continuous-time<dot>lisp file
cl-random/discrete.lisp: The cl-random/discrete<dot>lisp file
cl-random/generator.lisp: The cl-random/generator<dot>lisp file
cl-random/internals.lisp: The cl-random/internals<dot>lisp file
cl-random/package.lisp: The cl-random/package<dot>lisp file
cl-random/random.lisp: The cl-random/random<dot>lisp file
cl-random/simple-multiplicative-congruential-generators.lisp: The cl-random/simple-multiplicative-congruential-generators<dot>lisp file
cl-random/univariate.lisp: The cl-random/univariate<dot>lisp file

F
File, Lisp, cl-random.asd: The cl-random<dot>asd file
File, Lisp, cl-random/continuous-time.lisp: The cl-random/continuous-time<dot>lisp file
File, Lisp, cl-random/discrete.lisp: The cl-random/discrete<dot>lisp file
File, Lisp, cl-random/generator.lisp: The cl-random/generator<dot>lisp file
File, Lisp, cl-random/internals.lisp: The cl-random/internals<dot>lisp file
File, Lisp, cl-random/package.lisp: The cl-random/package<dot>lisp file
File, Lisp, cl-random/random.lisp: The cl-random/random<dot>lisp file
File, Lisp, cl-random/simple-multiplicative-congruential-generators.lisp: The cl-random/simple-multiplicative-congruential-generators<dot>lisp file
File, Lisp, cl-random/univariate.lisp: The cl-random/univariate<dot>lisp file

L
Lisp File, cl-random.asd: The cl-random<dot>asd file
Lisp File, cl-random/continuous-time.lisp: The cl-random/continuous-time<dot>lisp file
Lisp File, cl-random/discrete.lisp: The cl-random/discrete<dot>lisp file
Lisp File, cl-random/generator.lisp: The cl-random/generator<dot>lisp file
Lisp File, cl-random/internals.lisp: The cl-random/internals<dot>lisp file
Lisp File, cl-random/package.lisp: The cl-random/package<dot>lisp file
Lisp File, cl-random/random.lisp: The cl-random/random<dot>lisp file
Lisp File, cl-random/simple-multiplicative-congruential-generators.lisp: The cl-random/simple-multiplicative-congruential-generators<dot>lisp file
Lisp File, cl-random/univariate.lisp: The cl-random/univariate<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
A   B   C   D   F   G   J   L   M   N   P   Q   R   S   T   V   W  
Index Entry  Section

%
%next-double-float: Internal functions
%next-integer: Internal functions
%next-single-float: Internal functions

(
(setf left-truncated-normal-alpha): Internal functions
(setf left-truncated-normal-left): Internal functions
(setf left-truncated-normal-left-standardized): Internal functions
(setf left-truncated-normal-m0): Internal functions
(setf left-truncated-normal-mu): Internal functions
(setf left-truncated-normal-sigma): Internal functions
(setf r-bernoulli-pr): Internal functions
(setf r-beta-alpha): Internal functions
(setf r-beta-beta): Internal functions
(setf r-binomial-n): Internal functions
(setf r-binomial-pr): Internal functions
(setf r-discrete-alias): Internal functions
(setf r-discrete-n-float): Internal functions
(setf r-discrete-prob): Internal functions
(setf r-discrete-probabilities): Internal functions
(setf r-exponential-rate): Internal functions
(setf r-gamma-alpha): Internal functions
(setf r-gamma-beta): Internal functions
(setf r-geometric-pr): Internal functions
(setf r-inverse-gamma-alpha): Internal functions
(setf r-inverse-gamma-beta): Internal functions
(setf r-log-normal-log-mean): Internal functions
(setf r-log-normal-log-sd): Internal functions
(setf r-normal-mean): Internal functions
(setf r-normal-sd): Internal functions
(setf r-rayleigh-scale): Internal functions
(setf r-t-mean): Internal functions
(setf r-t-nu): Internal functions
(setf r-t-scale): Internal functions
(setf r-uniform-left): Internal functions
(setf r-uniform-right): Internal functions
(setf r-uniform-width): Internal functions
(setf r-uniformized-markov-jump-duration): Internal functions
(setf r-uniformized-markov-jump-jump): Internal functions
(setf r-uniformized-markov-jump-keys): Internal functions
(setf r-uniformized-markov-jump-n): Internal functions
(setf r-uniformized-markov-jump-no-change): Internal functions
(setf state): Internal generic functions
(setf state): Internal generic functions

A
a: Internal generic functions
a: Internal generic functions
alpha: Exported generic functions
alpha: Exported generic functions
alpha: Exported generic functions
alpha: Exported generic functions
as-float: Exported functions
as-float-probabilities: Exported functions
as-float-vector: Exported functions

B
beta: Exported generic functions
beta: Exported generic functions
beta: Exported generic functions
beta: Exported generic functions

C
cdf: Exported generic functions
cdf: Exported generic functions
cdf: Exported generic functions
cdf: Exported generic functions
cdf: Exported generic functions
cdf: Exported generic functions
cdf: Exported generic functions
cdf: Exported generic functions
cdf: Exported generic functions
cdf: Exported generic functions
cdf-normal%: Internal functions
check-probability: Internal functions
chunk-length: Internal generic functions
chunk-length: Internal generic functions
clone: Internal generic functions
clone: Internal generic functions
copy-left-truncated-normal: Internal functions
copy-r-bernoulli: Internal functions
copy-r-beta: Internal functions
copy-r-binomial: Internal functions
copy-r-discrete: Internal functions
copy-r-exponential: Internal functions
copy-r-gamma: Internal functions
copy-r-geometric: Internal functions
copy-r-inverse-gamma: Internal functions
copy-r-log-normal: Internal functions
copy-r-normal: Internal functions
copy-r-rayleigh: Internal functions
copy-r-t: Internal functions
copy-r-uniform: Internal functions
copy-r-uniformized-markov-jump: Internal functions
copy-r-univariate: Internal functions

D
default-seed: Internal generic functions
default-seed: Internal generic functions
define-rv: Internal macros
distinct-random-integers: Exported functions
distinct-random-integers-dense: Exported functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw: Exported generic functions
draw-bernoulli: Exported functions
draw-bernoulli-bit: Internal functions
draw-binomial: Exported functions
draw-exponential: Exported functions
draw-geometric: Exported functions
draw-left-truncated-standard-normal: Internal functions
draw-poisson: Exported functions
draw-rayleigh: Exported functions
draw-standard-exponential: Exported functions
draw-standard-gamma1: Internal functions
draw-standard-normal: Exported functions
draw-standard-t: Exported functions
draw-uniform: Exported functions
duration: Internal generic functions
duration: Internal generic functions

F
from-standard-normal: Exported functions
Function, %next-double-float: Internal functions
Function, %next-integer: Internal functions
Function, %next-single-float: Internal functions
Function, (setf left-truncated-normal-alpha): Internal functions
Function, (setf left-truncated-normal-left): Internal functions
Function, (setf left-truncated-normal-left-standardized): Internal functions
Function, (setf left-truncated-normal-m0): Internal functions
Function, (setf left-truncated-normal-mu): Internal functions
Function, (setf left-truncated-normal-sigma): Internal functions
Function, (setf r-bernoulli-pr): Internal functions
Function, (setf r-beta-alpha): Internal functions
Function, (setf r-beta-beta): Internal functions
Function, (setf r-binomial-n): Internal functions
Function, (setf r-binomial-pr): Internal functions
Function, (setf r-discrete-alias): Internal functions
Function, (setf r-discrete-n-float): Internal functions
Function, (setf r-discrete-prob): Internal functions
Function, (setf r-discrete-probabilities): Internal functions
Function, (setf r-exponential-rate): Internal functions
Function, (setf r-gamma-alpha): Internal functions
Function, (setf r-gamma-beta): Internal functions
Function, (setf r-geometric-pr): Internal functions
Function, (setf r-inverse-gamma-alpha): Internal functions
Function, (setf r-inverse-gamma-beta): Internal functions
Function, (setf r-log-normal-log-mean): Internal functions
Function, (setf r-log-normal-log-sd): Internal functions
Function, (setf r-normal-mean): Internal functions
Function, (setf r-normal-sd): Internal functions
Function, (setf r-rayleigh-scale): Internal functions
Function, (setf r-t-mean): Internal functions
Function, (setf r-t-nu): Internal functions
Function, (setf r-t-scale): Internal functions
Function, (setf r-uniform-left): Internal functions
Function, (setf r-uniform-right): Internal functions
Function, (setf r-uniform-width): Internal functions
Function, (setf r-uniformized-markov-jump-duration): Internal functions
Function, (setf r-uniformized-markov-jump-jump): Internal functions
Function, (setf r-uniformized-markov-jump-keys): Internal functions
Function, (setf r-uniformized-markov-jump-n): Internal functions
Function, (setf r-uniformized-markov-jump-no-change): Internal functions
Function, as-float: Exported functions
Function, as-float-probabilities: Exported functions
Function, as-float-vector: Exported functions
Function, cdf-normal%: Internal functions
Function, check-probability: Internal functions
Function, copy-left-truncated-normal: Internal functions
Function, copy-r-bernoulli: Internal functions
Function, copy-r-beta: Internal functions
Function, copy-r-binomial: Internal functions
Function, copy-r-discrete: Internal functions
Function, copy-r-exponential: Internal functions
Function, copy-r-gamma: Internal functions
Function, copy-r-geometric: Internal functions
Function, copy-r-inverse-gamma: Internal functions
Function, copy-r-log-normal: Internal functions
Function, copy-r-normal: Internal functions
Function, copy-r-rayleigh: Internal functions
Function, copy-r-t: Internal functions
Function, copy-r-uniform: Internal functions
Function, copy-r-uniformized-markov-jump: Internal functions
Function, copy-r-univariate: Internal functions
Function, distinct-random-integers: Exported functions
Function, distinct-random-integers-dense: Exported functions
Function, draw-bernoulli: Exported functions
Function, draw-bernoulli-bit: Internal functions
Function, draw-binomial: Exported functions
Function, draw-exponential: Exported functions
Function, draw-geometric: Exported functions
Function, draw-left-truncated-standard-normal: Internal functions
Function, draw-poisson: Exported functions
Function, draw-rayleigh: Exported functions
Function, draw-standard-exponential: Exported functions
Function, draw-standard-gamma1: Internal functions
Function, draw-standard-normal: Exported functions
Function, draw-standard-t: Exported functions
Function, draw-uniform: Exported functions
Function, from-standard-normal: Exported functions
Function, generate-seed: Internal functions
Function, left-truncated-normal: Internal functions
Function, left-truncated-normal-alpha: Internal functions
Function, left-truncated-normal-left: Internal functions
Function, left-truncated-normal-left-standardized: Internal functions
Function, left-truncated-normal-m0: Internal functions
Function, left-truncated-normal-mu: Internal functions
Function, left-truncated-normal-p: Internal functions
Function, left-truncated-normal-sigma: Internal functions
Function, log-gamma: Internal functions
Function, make-generator: Exported functions
Function, make-left-truncated-normal: Internal functions
Function, make-r-bernoulli: Internal functions
Function, make-r-beta: Internal functions
Function, make-r-binomial: Internal functions
Function, make-r-discrete: Internal functions
Function, make-r-exponential: Internal functions
Function, make-r-gamma: Internal functions
Function, make-r-geometric: Internal functions
Function, make-r-inverse-gamma: Internal functions
Function, make-r-log-normal: Internal functions
Function, make-r-normal: Internal functions
Function, make-r-rayleigh: Internal functions
Function, make-r-t: Internal functions
Function, make-r-uniform: Internal functions
Function, make-r-uniformized-markov-jump: Internal functions
Function, make-r-univariate: Internal functions
Function, next: Exported functions
Function, pdf: Exported functions
Function, quantile-normal%: Internal functions
Function, r-bernoulli: Exported functions
Function, r-bernoulli-p: Internal functions
Function, r-bernoulli-pr: Internal functions
Function, r-beta: Exported functions
Function, r-beta-alpha: Internal functions
Function, r-beta-beta: Internal functions
Function, r-beta-p: Internal functions
Function, r-binomial: Exported functions
Function, r-binomial-n: Internal functions
Function, r-binomial-p: Internal functions
Function, r-binomial-pr: Internal functions
Function, r-chi-square: Exported functions
Function, r-discrete: Exported functions
Function, r-discrete-alias: Internal functions
Function, r-discrete-n-float: Internal functions
Function, r-discrete-p: Internal functions
Function, r-discrete-prob: Internal functions
Function, r-discrete-probabilities: Internal functions
Function, r-exponential: Exported functions
Function, r-exponential-p: Internal functions
Function, r-exponential-rate: Internal functions
Function, r-gamma: Exported functions
Function, r-gamma-alpha: Internal functions
Function, r-gamma-beta: Internal functions
Function, r-gamma-p: Internal functions
Function, r-geometric: Exported functions
Function, r-geometric-p: Internal functions
Function, r-geometric-pr: Internal functions
Function, r-inverse-chi-square: Exported functions
Function, r-inverse-gamma: Exported functions
Function, r-inverse-gamma-alpha: Internal functions
Function, r-inverse-gamma-beta: Internal functions
Function, r-inverse-gamma-p: Internal functions
Function, r-log-normal: Exported functions
Function, r-log-normal-log-mean: Internal functions
Function, r-log-normal-log-sd: Internal functions
Function, r-log-normal-p: Internal functions
Function, r-normal: Exported functions
Function, r-normal-mean: Internal functions
Function, r-normal-p: Internal functions
Function, r-normal-sd: Internal functions
Function, r-rayleigh: Exported functions
Function, r-rayleigh-p: Internal functions
Function, r-rayleigh-scale: Internal functions
Function, r-t: Exported functions
Function, r-t-mean: Internal functions
Function, r-t-nu: Internal functions
Function, r-t-p: Internal functions
Function, r-t-scale: Internal functions
Function, r-truncated-normal: Exported functions
Function, r-uniform: Exported functions
Function, r-uniform-left: Internal functions
Function, r-uniform-p: Internal functions
Function, r-uniform-right: Internal functions
Function, r-uniform-width: Internal functions
Function, r-uniformized-markov-jump: Exported functions
Function, r-uniformized-markov-jump-duration: Internal functions
Function, r-uniformized-markov-jump-jump: Internal functions
Function, r-uniformized-markov-jump-keys: Internal functions
Function, r-uniformized-markov-jump-n: Internal functions
Function, r-uniformized-markov-jump-no-change: Internal functions
Function, r-uniformized-markov-jump-p: Internal functions
Function, r-univariate-p: Internal functions
Function, standard-gamma1-d-c: Internal functions
Function, t-scale-to-variance-coefficient: Exported functions
Function, to-standard-normal: Exported functions
Function, truncated-normal-moments%: Internal functions
Function, truncated-normal-optimal-alpha: Internal functions

G
generate-seed: Internal functions
generate-state: Internal generic functions
generate-state: Internal generic functions
generate-state: Internal generic functions
generator: Exported generic functions
generator: Exported generic functions
Generic Function, (setf state): Internal generic functions
Generic Function, a: Internal generic functions
Generic Function, alpha: Exported generic functions
Generic Function, beta: Exported generic functions
Generic Function, cdf: Exported generic functions
Generic Function, chunk-length: Internal generic functions
Generic Function, clone: Internal generic functions
Generic Function, default-seed: Internal generic functions
Generic Function, draw: Exported generic functions
Generic Function, duration: Internal generic functions
Generic Function, generate-state: Internal generic functions
Generic Function, generator: Exported generic functions
Generic Function, jump: Internal generic functions
Generic Function, left: Exported generic functions
Generic Function, log-pdf: Exported generic functions
Generic Function, m: Internal generic functions
Generic Function, mean: Exported generic functions
Generic Function, n: Internal generic functions
Generic Function, next-chunk: Internal generic functions
Generic Function, next-real: Internal generic functions
Generic Function, nu: Exported generic functions
Generic Function, pr: Internal generic functions
Generic Function, probabilities: Exported generic functions
Generic Function, quantile: Exported generic functions
Generic Function, rate: Exported generic functions
Generic Function, right: Exported generic functions
Generic Function, scale: Exported generic functions
Generic Function, sd: Internal generic functions
Generic Function, standard-deviation: Exported generic functions
Generic Function, state: Internal generic functions
Generic Function, s^2: Internal generic functions
Generic Function, variance: Exported generic functions

J
jump: Internal generic functions
jump: Internal generic functions

L
left: Exported generic functions
left: Exported generic functions
left-truncated-normal: Internal functions
left-truncated-normal-alpha: Internal functions
left-truncated-normal-left: Internal functions
left-truncated-normal-left-standardized: Internal functions
left-truncated-normal-m0: Internal functions
left-truncated-normal-mu: Internal functions
left-truncated-normal-p: Internal functions
left-truncated-normal-sigma: Internal functions
log-gamma: Internal functions
log-pdf: Exported generic functions
log-pdf: Exported generic functions
log-pdf: Exported generic functions
log-pdf: Exported generic functions
log-pdf: Exported generic functions
log-pdf: Exported generic functions
log-pdf: Exported generic functions
log-pdf: Exported generic functions
log-pdf: Exported generic functions

M
m: Internal generic functions
m: Internal generic functions
Macro, define-rv: Internal macros
Macro, maybe-ignore-constant: Exported macros
Macro, try: Exported macros
Macro, with-floats: Exported macros
make-generator: Exported functions
make-left-truncated-normal: Internal functions
make-r-bernoulli: Internal functions
make-r-beta: Internal functions
make-r-binomial: Internal functions
make-r-discrete: Internal functions
make-r-exponential: Internal functions
make-r-gamma: Internal functions
make-r-geometric: Internal functions
make-r-inverse-gamma: Internal functions
make-r-log-normal: Internal functions
make-r-normal: Internal functions
make-r-rayleigh: Internal functions
make-r-t: Internal functions
make-r-uniform: Internal functions
make-r-uniformized-markov-jump: Internal functions
make-r-univariate: Internal functions
maybe-ignore-constant: Exported macros
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
mean: Exported generic functions
Method, (setf state): Internal generic functions
Method, a: Internal generic functions
Method, alpha: Exported generic functions
Method, alpha: Exported generic functions
Method, alpha: Exported generic functions
Method, beta: Exported generic functions
Method, beta: Exported generic functions
Method, beta: Exported generic functions
Method, cdf: Exported generic functions
Method, cdf: Exported generic functions
Method, cdf: Exported generic functions
Method, cdf: Exported generic functions
Method, cdf: Exported generic functions
Method, cdf: Exported generic functions
Method, cdf: Exported generic functions
Method, cdf: Exported generic functions
Method, cdf: Exported generic functions
Method, chunk-length: Internal generic functions
Method, clone: Internal generic functions
Method, default-seed: Internal generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, draw: Exported generic functions
Method, duration: Internal generic functions
Method, generate-state: Internal generic functions
Method, generate-state: Internal generic functions
Method, generator: Exported generic functions
Method, jump: Internal generic functions
Method, left: Exported generic functions
Method, log-pdf: Exported generic functions
Method, log-pdf: Exported generic functions
Method, log-pdf: Exported generic functions
Method, log-pdf: Exported generic functions
Method, log-pdf: Exported generic functions
Method, log-pdf: Exported generic functions
Method, log-pdf: Exported generic functions
Method, log-pdf: Exported generic functions
Method, m: Internal generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, mean: Exported generic functions
Method, n: Internal generic functions
Method, next-chunk: Internal generic functions
Method, next-real: Internal generic functions
Method, nu: Exported generic functions
Method, nu: Exported generic functions
Method, nu: Exported generic functions
Method, pr: Internal generic functions
Method, pr: Internal generic functions
Method, pr: Internal generic functions
Method, probabilities: Exported generic functions
Method, quantile: Exported generic functions
Method, quantile: Exported generic functions
Method, quantile: Exported generic functions
Method, quantile: Exported generic functions
Method, quantile: Exported generic functions
Method, quantile: Exported generic functions
Method, quantile: Exported generic functions
Method, rate: Exported generic functions
Method, right: Exported generic functions
Method, scale: Exported generic functions
Method, scale: Exported generic functions
Method, sd: Internal generic functions
Method, standard-deviation: Exported generic functions
Method, state: Internal generic functions
Method, s^2: Internal generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions
Method, variance: Exported generic functions

N
n: Internal generic functions
n: Internal generic functions
next: Exported functions
next-chunk: Internal generic functions
next-chunk: Internal generic functions
next-real: Internal generic functions
next-real: Internal generic functions
nu: Exported generic functions
nu: Exported generic functions
nu: Exported generic functions
nu: Exported generic functions

P
pdf: Exported functions
pr: Internal generic functions
pr: Internal generic functions
pr: Internal generic functions
pr: Internal generic functions
probabilities: Exported generic functions
probabilities: Exported generic functions

Q
quantile: Exported generic functions
quantile: Exported generic functions
quantile: Exported generic functions
quantile: Exported generic functions
quantile: Exported generic functions
quantile: Exported generic functions
quantile: Exported generic functions
quantile: Exported generic functions
quantile-normal%: Internal functions

R
r-bernoulli: Exported functions
r-bernoulli-p: Internal functions
r-bernoulli-pr: Internal functions
r-beta: Exported functions
r-beta-alpha: Internal functions
r-beta-beta: Internal functions
r-beta-p: Internal functions
r-binomial: Exported functions
r-binomial-n: Internal functions
r-binomial-p: Internal functions
r-binomial-pr: Internal functions
r-chi-square: Exported functions
r-discrete: Exported functions
r-discrete-alias: Internal functions
r-discrete-n-float: Internal functions
r-discrete-p: Internal functions
r-discrete-prob: Internal functions
r-discrete-probabilities: Internal functions
r-exponential: Exported functions
r-exponential-p: Internal functions
r-exponential-rate: Internal functions
r-gamma: Exported functions
r-gamma-alpha: Internal functions
r-gamma-beta: Internal functions
r-gamma-p: Internal functions
r-geometric: Exported functions
r-geometric-p: Internal functions
r-geometric-pr: Internal functions
r-inverse-chi-square: Exported functions
r-inverse-gamma: Exported functions
r-inverse-gamma-alpha: Internal functions
r-inverse-gamma-beta: Internal functions
r-inverse-gamma-p: Internal functions
r-log-normal: Exported functions
r-log-normal-log-mean: Internal functions
r-log-normal-log-sd: Internal functions
r-log-normal-p: Internal functions
r-normal: Exported functions
r-normal-mean: Internal functions
r-normal-p: Internal functions
r-normal-sd: Internal functions
r-rayleigh: Exported functions
r-rayleigh-p: Internal functions
r-rayleigh-scale: Internal functions
r-t: Exported functions
r-t-mean: Internal functions
r-t-nu: Internal functions
r-t-p: Internal functions
r-t-scale: Internal functions
r-truncated-normal: Exported functions
r-uniform: Exported functions
r-uniform-left: Internal functions
r-uniform-p: Internal functions
r-uniform-right: Internal functions
r-uniform-width: Internal functions
r-uniformized-markov-jump: Exported functions
r-uniformized-markov-jump-duration: Internal functions
r-uniformized-markov-jump-jump: Internal functions
r-uniformized-markov-jump-keys: Internal functions
r-uniformized-markov-jump-n: Internal functions
r-uniformized-markov-jump-no-change: Internal functions
r-uniformized-markov-jump-p: Internal functions
r-univariate-p: Internal functions
rate: Exported generic functions
rate: Exported generic functions
right: Exported generic functions
right: Exported generic functions

S
scale: Exported generic functions
scale: Exported generic functions
scale: Exported generic functions
sd: Internal generic functions
sd: Internal generic functions
standard-deviation: Exported generic functions
standard-deviation: Exported generic functions
standard-gamma1-d-c: Internal functions
state: Internal generic functions
state: Internal generic functions
s^2: Internal generic functions
s^2: Internal generic functions

T
t-scale-to-variance-coefficient: Exported functions
to-standard-normal: Exported functions
truncated-normal-moments%: Internal functions
truncated-normal-optimal-alpha: Internal functions
try: Exported macros

V
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions
variance: Exported generic functions

W
with-floats: Exported macros

Jump to:   %   (  
A   B   C   D   F   G   J   L   M   N   P   Q   R   S   T   V   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
A   B   C   D   J   K   L   M   N   P   R   S   W  
Index Entry  Section

*
*default-generator-type*: Internal special variables

+
+normal-log-pdf-constant+: Internal constants

A
a: Exported classes
a: Exported classes
a: Exported classes
a: Exported classes
a: Internal classes
alias: Exported structures
alpha: Exported structures
alpha: Exported structures
alpha: Exported structures
alpha: Internal structures

B
beta: Exported structures
beta: Exported structures
beta: Exported structures

C
chunk-length: Exported classes
chunk-length: Exported classes
chunk-length: Exported classes
chunk-length: Exported classes
chunk-length: Exported classes
Constant, +normal-log-pdf-constant+: Internal constants

D
default-seed: Exported classes
default-seed: Internal classes
duration: Exported structures

J
jump: Exported structures

K
keys: Exported structures

L
left: Exported structures
left: Internal structures
left-standardized: Internal structures
log-mean: Exported structures
log-sd: Exported structures

M
m: Internal classes
m0: Internal structures
max: Exported classes
mean: Exported structures
mean: Exported structures
min: Exported classes
mu: Internal structures

N
n: Exported structures
n: Exported structures
n-float: Exported structures
no-change: Exported structures
nu: Exported structures

P
pr: Exported structures
pr: Exported structures
pr: Exported structures
prob: Exported structures
probabilities: Exported structures

R
rate: Exported structures
right: Exported structures

S
scale: Exported structures
scale: Exported structures
sd: Exported structures
sigma: Internal structures
Slot, a: Exported classes
Slot, a: Exported classes
Slot, a: Exported classes
Slot, a: Exported classes
Slot, a: Internal classes
Slot, alias: Exported structures
Slot, alpha: Exported structures
Slot, alpha: Exported structures
Slot, alpha: Exported structures
Slot, alpha: Internal structures
Slot, beta: Exported structures
Slot, beta: Exported structures
Slot, beta: Exported structures
Slot, chunk-length: Exported classes
Slot, chunk-length: Exported classes
Slot, chunk-length: Exported classes
Slot, chunk-length: Exported classes
Slot, chunk-length: Exported classes
Slot, default-seed: Exported classes
Slot, default-seed: Internal classes
Slot, duration: Exported structures
Slot, jump: Exported structures
Slot, keys: Exported structures
Slot, left: Exported structures
Slot, left: Internal structures
Slot, left-standardized: Internal structures
Slot, log-mean: Exported structures
Slot, log-sd: Exported structures
Slot, m: Internal classes
Slot, m0: Internal structures
Slot, max: Exported classes
Slot, mean: Exported structures
Slot, mean: Exported structures
Slot, min: Exported classes
Slot, mu: Internal structures
Slot, n: Exported structures
Slot, n: Exported structures
Slot, n-float: Exported structures
Slot, no-change: Exported structures
Slot, nu: Exported structures
Slot, pr: Exported structures
Slot, pr: Exported structures
Slot, pr: Exported structures
Slot, prob: Exported structures
Slot, probabilities: Exported structures
Slot, rate: Exported structures
Slot, right: Exported structures
Slot, scale: Exported structures
Slot, scale: Exported structures
Slot, sd: Exported structures
Slot, sigma: Internal structures
Slot, state: Exported classes
Slot, width: Exported structures
Special Variable, *default-generator-type*: Internal special variables
state: Exported classes

W
width: Exported structures

Jump to:   *   +  
A   B   C   D   J   K   L   M   N   P   R   S   W  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   C   F   G   I   L   P   R   S   T   W  
Index Entry  Section

B
borosh13: Exported classes

C
cl-random: The cl-random system
cl-random: The cl-random package
cl-random.internals: The cl-random<dot>internals package
Class, borosh13: Exported classes
Class, generator: Exported classes
Class, randu: Exported classes
Class, simple-multiplicative-congruential: Internal classes
Class, transputer: Exported classes
Class, waterman14: Exported classes

F
float-vector: Exported types

G
generator: Exported classes

I
internal-float: Exported types

L
left-truncated-normal: Internal structures

P
Package, cl-random: The cl-random package
Package, cl-random.internals: The cl-random<dot>internals package

R
r-bernoulli: Exported structures
r-beta: Exported structures
r-binomial: Exported structures
r-discrete: Exported structures
r-exponential: Exported structures
r-gamma: Exported structures
r-geometric: Exported structures
r-inverse-gamma: Exported structures
r-log-normal: Exported structures
r-normal: Exported structures
r-rayleigh: Exported structures
r-t: Exported structures
r-uniform: Exported structures
r-uniformized-markov-jump: Exported structures
r-univariate: Internal structures
randu: Exported classes

S
simple-multiplicative-congruential: Internal classes
Structure, left-truncated-normal: Internal structures
Structure, r-bernoulli: Exported structures
Structure, r-beta: Exported structures
Structure, r-binomial: Exported structures
Structure, r-discrete: Exported structures
Structure, r-exponential: Exported structures
Structure, r-gamma: Exported structures
Structure, r-geometric: Exported structures
Structure, r-inverse-gamma: Exported structures
Structure, r-log-normal: Exported structures
Structure, r-normal: Exported structures
Structure, r-rayleigh: Exported structures
Structure, r-t: Exported structures
Structure, r-uniform: Exported structures
Structure, r-uniformized-markov-jump: Exported structures
Structure, r-univariate: Internal structures
System, cl-random: The cl-random system

T
transputer: Exported classes
Type, float-vector: Exported types
Type, internal-float: Exported types

W
waterman14: Exported classes

Jump to:   B   C   F   G   I   L   P   R   S   T   W