The random-sample Reference Manual

This is the random-sample Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:32:46 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 random-sample

Random sample of a sequence with uniform distribution.

Author

Paul M. Rodriguez <>

License

MIT

Dependencies
  • alexandria (system).
  • serapeum (system).
  • infix-math (system).
  • named-readtables (system).
Source

random-sample.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 random-sample/random-sample.asd

Source

random-sample.asd.

Parent Component

random-sample (system).

ASDF Systems

random-sample.


3.1.2 random-sample/package.lisp

Source

random-sample.asd.

Parent Component

random-sample (system).

Packages

random-sample.


3.1.3 random-sample/readtable.lisp

Dependency

package.lisp (file).

Source

random-sample.asd.

Parent Component

random-sample (system).


3.1.4 random-sample/random-sample.lisp

Dependency

readtable.lisp (file).

Source

random-sample.asd.

Parent Component

random-sample (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 random-sample

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • editor-hints.named-readtables.
  • serapeum.
Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Ordinary functions

Function: generate-index-array (n len)
Package

random-sample.

Source

random-sample.lisp.

Function: map-random-below (fn n len)

Generate N random indices for a sequence of length LEN, in ascending order, calling FN on each index as it is generated.

Package

random-sample.

Source

random-sample.lisp.

Function: random-sample (seq n &key with-replacement)

Return a random sample of SEQ of size N.

If WITH-REPLACEMENT is true, return a random sample with replacement (a "draw").

If WITH-REPLACEMENT is false, return a random sample without replacement (a "deal").

Package

random-sample.

Source

random-sample.lisp.


5.2 Internals


5.2.1 Constants

Constant: +storage-for-deflex-var-alpha+

The parameter that decides whether to use method A or method D.

Package

random-sample.

Source

random-sample.lisp.


5.2.2 Symbol macros

Symbol Macro: alpha
Package

random-sample.

Source

random-sample.lisp.


5.2.3 Ordinary functions

Function: collect-sample (seq index-array)
Package

random-sample.

Source

random-sample.lisp.

Function: generate-index-array/replacement (n len)
Package

random-sample.

Source

random-sample.lisp.

Function: uniformrv ()
Package

random-sample.

Source

random-sample.lisp.

Function: vitter-method-a (fn n n)

Vitter’s Method A.

Mostly faithful to Vitter’s Pascal code, but uses advanced Common Lisp features like exponents and subtraction.

Package

random-sample.

Source

random-sample.lisp.

Function: vitter-method-d (fn n n)

Vitter’s Method D.

Package

random-sample.

Source

random-sample.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables