This is the random-state Reference Manual, version 1.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:32:50 2024 GMT+0.
random-state/random-state.asd
random-state/package.lisp
random-state/toolkit.lisp
random-state/generator.lisp
random-state/protocol.lisp
random-state/primes.lisp
random-state/adler32.lisp
random-state/cityhash.lisp
random-state/hammersley.lisp
random-state/linear-congruence.lisp
random-state/kiss.lisp
random-state/mersenne-twister.lisp
random-state/middle-square.lisp
random-state/murmurhash.lisp
random-state/pcg.lisp
random-state/quasi.lisp
random-state/rc4.lisp
random-state/sobol.lisp
random-state/squirrel.lisp
random-state/tt800.lisp
random-state/xkcd.lisp
random-state/xorshift.lisp
random-state/implementation.lisp
random-state/histogram.lisp
random-state/documentation.lisp
The main system appears first, followed by any subsystem dependency.
random-state
Portable random number generation.
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/random-state.git)
zlib
1.0.1
documentation-utils
(system).
package.lisp
(file).
toolkit.lisp
(file).
generator.lisp
(file).
protocol.lisp
(file).
primes.lisp
(file).
adler32.lisp
(file).
cityhash.lisp
(file).
hammersley.lisp
(file).
linear-congruence.lisp
(file).
kiss.lisp
(file).
mersenne-twister.lisp
(file).
middle-square.lisp
(file).
murmurhash.lisp
(file).
pcg.lisp
(file).
quasi.lisp
(file).
rc4.lisp
(file).
sobol.lisp
(file).
squirrel.lisp
(file).
tt800.lisp
(file).
xkcd.lisp
(file).
xorshift.lisp
(file).
implementation.lisp
(file).
histogram.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
random-state/random-state.asd
random-state/package.lisp
random-state/toolkit.lisp
random-state/generator.lisp
random-state/protocol.lisp
random-state/primes.lisp
random-state/adler32.lisp
random-state/cityhash.lisp
random-state/hammersley.lisp
random-state/linear-congruence.lisp
random-state/kiss.lisp
random-state/mersenne-twister.lisp
random-state/middle-square.lisp
random-state/murmurhash.lisp
random-state/pcg.lisp
random-state/quasi.lisp
random-state/rc4.lisp
random-state/sobol.lisp
random-state/squirrel.lisp
random-state/tt800.lisp
random-state/xkcd.lisp
random-state/xorshift.lisp
random-state/implementation.lisp
random-state/histogram.lisp
random-state/documentation.lisp
random-state/toolkit.lisp
package.lisp
(file).
random-state
(system).
hopefully-sufficiently-random-seed
(function).
%arr
(macro).
32bit-seed-array
(function).
64bit-seed-array
(function).
barr
(function).
byte-array-to-int
(function).
define-pregenerated
(macro).
fit-bits
(compiler macro).
fit-bits
(function).
incfmod
(macro).
intern*
(function).
list-dim
(function).
update
(macro).
random-state/generator.lisp
toolkit.lisp
(file).
random-state
(system).
bits-per-byte
(compiler macro).
bits-per-byte
(generic function).
copy
(compiler macro).
copy
(generic function).
define-generator
(macro).
ensure-generator
(compiler macro).
ensure-generator
(function).
generator
(structure).
global-generator
(compiler macro).
global-generator
(function).
(setf global-generator)
(function).
hash-generator
(structure).
index
(reader).
(setf index)
(writer).
list-generator-types
(function).
make-generator
(function).
make-load-form
(method).
multivariate-p
(function).
next-byte
(compiler macro).
next-byte
(generic function).
print-object
(method).
reseed
(compiler macro).
reseed
(generic function).
rewind
(compiler macro).
rewind
(generic function).
seed
(compiler macro).
seed
(generic function).
stateful-generator
(structure).
%make-generator
(generic function).
%seed
(reader).
(setf %seed)
(writer).
*generator-types*
(special variable).
*generators*
(special variable).
define-generator-fun
(macro).
generator-p
(function).
hash
(compiler macro).
hash
(generic function).
stateful-generator-%seed
(function).
(setf stateful-generator-%seed)
(function).
random-state/protocol.lisp
generator.lisp
(file).
random-state
(system).
*generator*
(special variable).
draw
(function).
random
(function).
random-1d
(function).
random-2d
(function).
random-3d
(function).
random-byte
(function).
random-bytes
(function).
random-float
(compiler macro).
random-float
(function).
random-int
(function).
random-sequence
(function).
random-unit
(compiler macro).
random-unit
(function).
random-state/primes.lisp
protocol.lisp
(file).
random-state
(system).
compute-ruiz-pi
(function).
compute-ruiz-pis-part1
(function).
prime
(function).
random-state/adler32.lisp
primes.lisp
(file).
random-state
(system).
adler32
(structure).
bits-per-byte
(method).
copy
(method).
next-byte
(method).
%make-generator
(method).
adler32-%seed
(function).
(setf adler32-%seed)
(function).
adler32-hash
(function).
adler32-index
(function).
(setf adler32-index)
(function).
adler32-next
(function).
copy-adler32
(function).
hash
(method).
make-adler32
(function).
next-byte-fun
(method).
random-state/cityhash.lisp
adler32.lisp
(file).
random-state
(system).
bits-per-byte
(method).
cityhash-64
(structure).
copy
(method).
next-byte
(method).
%make-generator
(method).
cityhash-64-%seed
(function).
(setf cityhash-64-%seed)
(function).
cityhash-64-hash
(function).
cityhash-64-index
(function).
(setf cityhash-64-index)
(function).
cityhash-64-next
(function).
copy-cityhash-64
(function).
hash
(method).
make-cityhash-64
(function).
next-byte-fun
(method).
random-state/hammersley.lisp
cityhash.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
hammersley
(structure).
next-byte
(method).
%make-generator
(method).
copy-hammersley
(function).
hammersley-%seed
(function).
(setf hammersley-%seed)
(function).
hammersley-hash
(function).
hammersley-index
(function).
(setf hammersley-index)
(function).
hammersley-leap
(reader).
(setf hammersley-leap)
(writer).
hammersley-next
(function).
hash
(method).
make-hammersley
(function).
next-byte-fun
(method).
random-state/linear-congruence.lisp
hammersley.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
linear-congruence
(structure).
next-byte
(method).
reseed
(method).
%make-generator
(method).
copy-linear-congruence
(function).
linear-congruence-%seed
(function).
(setf linear-congruence-%seed)
(function).
linear-congruence-increment
(reader).
(setf linear-congruence-increment)
(writer).
linear-congruence-multiplier
(reader).
(setf linear-congruence-multiplier)
(writer).
linear-congruence-next
(function).
linear-congruence-reseed
(function).
linear-congruence-state
(reader).
(setf linear-congruence-state)
(writer).
make-linear-congruence
(function).
next-byte-fun
(method).
random-state/kiss.lisp
linear-congruence.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
kiss11
(structure).
next-byte
(method).
reseed
(method).
%make-generator
(method).
copy-kiss11
(function).
kiss11-%seed
(function).
(setf kiss11-%seed)
(function).
kiss11-carry
(reader).
(setf kiss11-carry)
(writer).
kiss11-cng
(reader).
(setf kiss11-cng)
(writer).
kiss11-j
(reader).
(setf kiss11-j)
(writer).
kiss11-next
(function).
kiss11-q
(reader).
(setf kiss11-q)
(writer).
kiss11-reseed
(function).
kiss11-xs
(reader).
(setf kiss11-xs)
(writer).
make-kiss11
(function).
next-byte-fun
(method).
random-state/mersenne-twister.lisp
kiss.lisp
(file).
random-state
(system).
bits-per-byte
(method).
bits-per-byte
(method).
copy
(method).
copy
(method).
mersenne-twister-32
(structure).
mersenne-twister-64
(structure).
next-byte
(method).
next-byte
(method).
reseed
(method).
reseed
(method).
%inner-mersenne-twister
(macro).
%make-generator
(method).
%make-generator
(method).
copy-mersenne-twister
(function).
copy-mersenne-twister-32
(function).
copy-mersenne-twister-64
(function).
make-mersenne-twister-32
(function).
make-mersenne-twister-64
(function).
mersenne-twister
(structure).
mersenne-twister-%seed
(function).
(setf mersenne-twister-%seed)
(function).
mersenne-twister-32-%seed
(function).
(setf mersenne-twister-32-%seed)
(function).
mersenne-twister-32-index
(reader).
(setf mersenne-twister-32-index)
(writer).
mersenne-twister-32-lower
(reader).
(setf mersenne-twister-32-lower)
(writer).
mersenne-twister-32-magic
(reader).
(setf mersenne-twister-32-magic)
(writer).
mersenne-twister-32-matrix
(reader).
(setf mersenne-twister-32-matrix)
(writer).
mersenne-twister-32-next
(function).
mersenne-twister-32-reseed
(function).
mersenne-twister-32-upper
(reader).
(setf mersenne-twister-32-upper)
(writer).
mersenne-twister-64-%seed
(function).
(setf mersenne-twister-64-%seed)
(function).
mersenne-twister-64-index
(reader).
(setf mersenne-twister-64-index)
(writer).
mersenne-twister-64-lower
(reader).
(setf mersenne-twister-64-lower)
(writer).
mersenne-twister-64-magic
(reader).
(setf mersenne-twister-64-magic)
(writer).
mersenne-twister-64-matrix
(reader).
(setf mersenne-twister-64-matrix)
(writer).
mersenne-twister-64-next
(function).
mersenne-twister-64-reseed
(function).
mersenne-twister-64-upper
(reader).
(setf mersenne-twister-64-upper)
(writer).
mersenne-twister-index
(reader).
(setf mersenne-twister-index)
(writer).
next-byte-fun
(method).
next-byte-fun
(method).
random-state/middle-square.lisp
mersenne-twister.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
middle-square
(structure).
next-byte
(method).
reseed
(method).
%make-generator
(method).
copy-middle-square
(function).
make-middle-square
(function).
middle-square-%seed
(function).
(setf middle-square-%seed)
(function).
middle-square-bits
(reader).
(setf middle-square-bits)
(writer).
middle-square-next
(function).
middle-square-reseed
(function).
middle-square-state
(reader).
(setf middle-square-state)
(writer).
next-byte-fun
(method).
random-state/murmurhash.lisp
middle-square.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
murmurhash3
(structure).
next-byte
(method).
%make-generator
(method).
copy-murmurhash3
(function).
hash
(method).
make-murmurhash3
(function).
murmurhash3-%seed
(function).
(setf murmurhash3-%seed)
(function).
murmurhash3-hash
(function).
murmurhash3-index
(function).
(setf murmurhash3-index)
(function).
murmurhash3-next
(function).
next-byte-fun
(method).
random-state/pcg.lisp
murmurhash.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
next-byte
(method).
pcg
(structure).
reseed
(method).
%make-generator
(method).
copy-pcg
(function).
make-pcg
(function).
next-byte-fun
(method).
pcg-%seed
(function).
(setf pcg-%seed)
(function).
pcg-inc
(reader).
(setf pcg-inc)
(writer).
pcg-next
(function).
pcg-reseed
(function).
pcg-state
(reader).
(setf pcg-state)
(writer).
random-state/quasi.lisp
pcg.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
next-byte
(method).
quasi
(structure).
reseed
(method).
%make-generator
(method).
copy-quasi
(function).
make-quasi
(function).
next-byte-fun
(method).
quasi-%seed
(function).
(setf quasi-%seed)
(function).
quasi-last
(reader).
(setf quasi-last)
(writer).
quasi-next
(function).
quasi-reseed
(function).
quasi-source
(reader).
(setf quasi-source)
(writer).
random-state/rc4.lisp
quasi.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
next-byte
(method).
rc4
(structure).
reseed
(method).
%make-generator
(method).
copy-rc4
(function).
make-rc4
(function).
next-byte-fun
(method).
rc4-%seed
(function).
(setf rc4-%seed)
(function).
rc4-index1
(reader).
(setf rc4-index1)
(writer).
rc4-index2
(reader).
(setf rc4-index2)
(writer).
rc4-next
(function).
rc4-reseed
(function).
rc4-state
(reader).
(setf rc4-state)
(writer).
random-state/sobol.lisp
rc4.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
next-byte
(method).
reseed
(method).
sobol
(structure).
%make-generator
(method).
copy-sobol
(function).
make-sobol
(function).
next-byte-fun
(method).
rightzero32
(function).
sobol-%seed
(function).
(setf sobol-%seed)
(function).
sobol-a
(symbol macro).
sobol-a
(function).
sobol-b
(reader).
(setf sobol-b)
(writer).
sobol-dim
(reader).
(setf sobol-dim)
(writer).
sobol-init
(symbol macro).
sobol-init
(function).
sobol-m
(reader).
(setf sobol-m)
(writer).
sobol-mdata
(reader).
(setf sobol-mdata)
(writer).
sobol-n
(reader).
(setf sobol-n)
(writer).
sobol-next
(function).
sobol-reseed
(function).
sobol-x
(reader).
(setf sobol-x)
(writer).
random-state/squirrel.lisp
sobol.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
next-byte
(method).
squirrel
(structure).
%make-generator
(method).
copy-squirrel
(function).
hash
(method).
make-squirrel
(function).
next-byte-fun
(method).
squirrel-%seed
(function).
(setf squirrel-%seed)
(function).
squirrel-hash
(function).
squirrel-index
(function).
(setf squirrel-index)
(function).
squirrel-next
(function).
random-state/tt800.lisp
squirrel.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
next-byte
(method).
reseed
(method).
tt800
(structure).
%make-generator
(method).
copy-tt800
(function).
make-tt800
(function).
next-byte-fun
(method).
tt800-%seed
(function).
(setf tt800-%seed)
(function).
tt800-index
(reader).
(setf tt800-index)
(writer).
tt800-m
(reader).
(setf tt800-m)
(writer).
tt800-magic
(reader).
(setf tt800-magic)
(writer).
tt800-matrix
(reader).
(setf tt800-matrix)
(writer).
tt800-n
(reader).
(setf tt800-n)
(writer).
tt800-next
(function).
tt800-reseed
(function).
random-state/xkcd.lisp
tt800.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
next-byte
(method).
reseed
(method).
xkcd
(structure).
%make-generator
(method).
copy-xkcd
(function).
make-xkcd
(function).
next-byte-fun
(method).
xkcd-%seed
(function).
(setf xkcd-%seed)
(function).
xkcd-next
(function).
xkcd-reseed
(function).
random-state/xorshift.lisp
xkcd.lisp
(file).
random-state
(system).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
bits-per-byte
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
copy
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
next-byte
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
reseed
(method).
xorshift-1024*
(structure).
xorshift-128
(structure).
xorshift-128+
(structure).
xorshift-32
(structure).
xorshift-64
(structure).
xorshift-64*
(structure).
xorwow
(structure).
xoshiro-128**
(structure).
xoshiro-128+
(structure).
xoshiro-256**
(structure).
xoshiro-256+
(structure).
%inner-xoshiro
(macro).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%make-generator
(method).
%xorshift
(macro).
copy-xoroshiro-128**
(function).
copy-xoroshiro-128+
(function).
copy-xoroshiro-128++
(function).
copy-xoroshiro-64*
(function).
copy-xoroshiro-64**
(function).
copy-xorshift-1024*
(function).
copy-xorshift-128
(function).
copy-xorshift-128+
(function).
copy-xorshift-32
(function).
copy-xorshift-64
(function).
copy-xorshift-64*
(function).
copy-xorshift-generator
(function).
copy-xorwow
(function).
copy-xoshiro-128**
(function).
copy-xoshiro-128+
(function).
copy-xoshiro-128++
(function).
copy-xoshiro-256**
(function).
copy-xoshiro-256+
(function).
copy-xoshiro-256++
(function).
copy-xoshiro-generator
(function).
make-xoroshiro-128**
(function).
make-xoroshiro-128+
(function).
make-xoroshiro-128++
(function).
make-xoroshiro-64*
(function).
make-xoroshiro-64**
(function).
make-xorshift-1024*
(function).
make-xorshift-128
(function).
make-xorshift-128+
(function).
make-xorshift-32
(function).
make-xorshift-64
(function).
make-xorshift-64*
(function).
make-xorwow
(function).
make-xoshiro-128**
(function).
make-xoshiro-128+
(function).
make-xoshiro-128++
(function).
make-xoshiro-256**
(function).
make-xoshiro-256+
(function).
make-xoshiro-256++
(function).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
next-byte-fun
(method).
splitmix32-array
(function).
splitmix64
(function).
splitmix64-array
(function).
xoroshiro-128**
(structure).
xoroshiro-128**-%seed
(function).
(setf xoroshiro-128**-%seed)
(function).
xoroshiro-128**-next
(function).
xoroshiro-128**-reseed
(function).
xoroshiro-128**-values
(reader).
(setf xoroshiro-128**-values)
(writer).
xoroshiro-128+
(structure).
xoroshiro-128++
(structure).
xoroshiro-128++-%seed
(function).
(setf xoroshiro-128++-%seed)
(function).
xoroshiro-128++-next
(function).
xoroshiro-128++-reseed
(function).
xoroshiro-128++-values
(reader).
(setf xoroshiro-128++-values)
(writer).
xoroshiro-128+-%seed
(function).
(setf xoroshiro-128+-%seed)
(function).
xoroshiro-128+-next
(function).
xoroshiro-128+-reseed
(function).
xoroshiro-128+-values
(reader).
(setf xoroshiro-128+-values)
(writer).
xoroshiro-64*
(structure).
xoroshiro-64**
(structure).
xoroshiro-64**-%seed
(function).
(setf xoroshiro-64**-%seed)
(function).
xoroshiro-64**-magic
(reader).
(setf xoroshiro-64**-magic)
(writer).
xoroshiro-64**-next
(function).
xoroshiro-64**-reseed
(function).
xoroshiro-64**-values
(reader).
(setf xoroshiro-64**-values)
(writer).
xoroshiro-64*-%seed
(function).
(setf xoroshiro-64*-%seed)
(function).
xoroshiro-64*-magic
(reader).
(setf xoroshiro-64*-magic)
(writer).
xoroshiro-64*-next
(function).
xoroshiro-64*-reseed
(function).
xoroshiro-64*-values
(reader).
(setf xoroshiro-64*-values)
(writer).
xorshift-1024*-%seed
(function).
(setf xorshift-1024*-%seed)
(function).
xorshift-1024*-index
(reader).
(setf xorshift-1024*-index)
(writer).
xorshift-1024*-magic
(reader).
(setf xorshift-1024*-magic)
(writer).
xorshift-1024*-next
(function).
xorshift-1024*-reseed
(function).
xorshift-1024*-values
(reader).
(setf xorshift-1024*-values)
(writer).
xorshift-1024*-xorshifts
(reader).
(setf xorshift-1024*-xorshifts)
(writer).
xorshift-128+-%seed
(function).
(setf xorshift-128+-%seed)
(function).
xorshift-128+-next
(function).
xorshift-128+-reseed
(function).
xorshift-128+-values
(reader).
(setf xorshift-128+-values)
(writer).
xorshift-128+-xorshifts
(reader).
(setf xorshift-128+-xorshifts)
(writer).
xorshift-128-%seed
(function).
(setf xorshift-128-%seed)
(function).
xorshift-128-next
(function).
xorshift-128-reseed
(function).
xorshift-128-values
(reader).
(setf xorshift-128-values)
(writer).
xorshift-128-xorshifts
(reader).
(setf xorshift-128-xorshifts)
(writer).
xorshift-32-%seed
(function).
(setf xorshift-32-%seed)
(function).
xorshift-32-next
(function).
xorshift-32-reseed
(function).
xorshift-32-value
(reader).
(setf xorshift-32-value)
(writer).
xorshift-32-xorshifts
(reader).
(setf xorshift-32-xorshifts)
(writer).
xorshift-64*-%seed
(function).
(setf xorshift-64*-%seed)
(function).
xorshift-64*-magic
(reader).
(setf xorshift-64*-magic)
(writer).
xorshift-64*-next
(function).
xorshift-64*-reseed
(function).
xorshift-64*-value
(reader).
(setf xorshift-64*-value)
(writer).
xorshift-64*-xorshifts
(reader).
(setf xorshift-64*-xorshifts)
(writer).
xorshift-64-%seed
(function).
(setf xorshift-64-%seed)
(function).
xorshift-64-next
(function).
xorshift-64-reseed
(function).
xorshift-64-value
(reader).
(setf xorshift-64-value)
(writer).
xorshift-64-xorshifts
(reader).
(setf xorshift-64-xorshifts)
(writer).
xorshift-generator
(structure).
xorshift-generator-%seed
(function).
(setf xorshift-generator-%seed)
(function).
xorshift-generator-xorshifts
(reader).
(setf xorshift-generator-xorshifts)
(writer).
xorshifts
(function).
xorwow-%seed
(function).
(setf xorwow-%seed)
(function).
xorwow-counter
(reader).
(setf xorwow-counter)
(writer).
xorwow-next
(function).
xorwow-reseed
(function).
xorwow-values
(reader).
(setf xorwow-values)
(writer).
xorwow-xorshifts
(reader).
(setf xorwow-xorshifts)
(writer).
xoshiro-128**-%seed
(function).
(setf xoshiro-128**-%seed)
(function).
xoshiro-128**-next
(function).
xoshiro-128**-reseed
(function).
xoshiro-128**-values
(reader).
(setf xoshiro-128**-values)
(writer).
xoshiro-128++
(structure).
xoshiro-128++-%seed
(function).
(setf xoshiro-128++-%seed)
(function).
xoshiro-128++-next
(function).
xoshiro-128++-reseed
(function).
xoshiro-128++-values
(reader).
(setf xoshiro-128++-values)
(writer).
xoshiro-128+-%seed
(function).
(setf xoshiro-128+-%seed)
(function).
xoshiro-128+-next
(function).
xoshiro-128+-reseed
(function).
xoshiro-128+-values
(reader).
(setf xoshiro-128+-values)
(writer).
xoshiro-256**-%seed
(function).
(setf xoshiro-256**-%seed)
(function).
xoshiro-256**-next
(function).
xoshiro-256**-reseed
(function).
xoshiro-256**-values
(reader).
(setf xoshiro-256**-values)
(writer).
xoshiro-256++
(structure).
xoshiro-256++-%seed
(function).
(setf xoshiro-256++-%seed)
(function).
xoshiro-256++-next
(function).
xoshiro-256++-reseed
(function).
xoshiro-256++-values
(reader).
(setf xoshiro-256++-values)
(writer).
xoshiro-256+-%seed
(function).
(setf xoshiro-256+-%seed)
(function).
xoshiro-256+-next
(function).
xoshiro-256+-reseed
(function).
xoshiro-256+-values
(reader).
(setf xoshiro-256+-values)
(writer).
xoshiro-generator
(structure).
xoshiro-generator-%seed
(function).
(setf xoshiro-generator-%seed)
(function).
xoshiro-rol32
(function).
xoshiro-rol64
(function).
random-state/implementation.lisp
xorshift.lisp
(file).
random-state
(system).
bits-per-byte
(method).
copy
(method).
next-byte
(method).
reseed
(method).
seed
(method).
%make-generator
(method).
next-byte-fun
(method).
random-state/histogram.lisp
implementation.lisp
(file).
random-state
(system).
benchmark
(function).
benchmark-all
(function).
histogram
(function).
print-histogram
(function).
random-state/documentation.lisp
histogram.lisp
(file).
random-state
(system).
Packages are listed by definition order.
random-state
org.shirakumo.random-state
common-lisp
.
*generator*
(special variable).
adler32
(structure).
benchmark
(function).
benchmark-all
(function).
bits-per-byte
(compiler macro).
bits-per-byte
(generic function).
cityhash-64
(structure).
copy
(compiler macro).
copy
(generic function).
define-generator
(macro).
draw
(function).
ensure-generator
(compiler macro).
ensure-generator
(function).
generator
(structure).
global-generator
(compiler macro).
global-generator
(function).
(setf global-generator)
(function).
hammersley
(structure).
hash-generator
(structure).
histogram
(function).
hopefully-sufficiently-random-seed
(function).
index
(reader).
(setf index)
(writer).
kiss11
(structure).
linear-congruence
(structure).
list-generator-types
(function).
make-generator
(function).
mersenne-twister-32
(structure).
mersenne-twister-64
(structure).
middle-square
(structure).
multivariate-p
(function).
murmurhash3
(structure).
next-byte
(compiler macro).
next-byte
(generic function).
pcg
(structure).
print-histogram
(function).
quasi
(structure).
random
(function).
random-1d
(function).
random-2d
(function).
random-3d
(function).
random-byte
(function).
random-bytes
(function).
random-float
(compiler macro).
random-float
(function).
random-int
(function).
random-sequence
(function).
random-unit
(compiler macro).
random-unit
(function).
rc4
(structure).
reseed
(compiler macro).
reseed
(generic function).
rewind
(compiler macro).
rewind
(generic function).
seed
(compiler macro).
seed
(generic function).
sobol
(structure).
squirrel
(structure).
stateful-generator
(structure).
tt800
(structure).
xkcd
(structure).
xorshift-1024*
(structure).
xorshift-128
(structure).
xorshift-128+
(structure).
xorshift-32
(structure).
xorshift-64
(structure).
xorshift-64*
(structure).
xorwow
(structure).
xoshiro-128**
(structure).
xoshiro-128+
(structure).
xoshiro-256**
(structure).
xoshiro-256+
(structure).
%arr
(macro).
%inner-mersenne-twister
(macro).
%inner-xoshiro
(macro).
%make-generator
(generic function).
%seed
(reader).
(setf %seed)
(writer).
%xorshift
(macro).
*generator-types*
(special variable).
*generators*
(special variable).
32bit-seed-array
(function).
64bit-seed-array
(function).
adler32-%seed
(function).
(setf adler32-%seed)
(function).
adler32-hash
(function).
adler32-index
(function).
(setf adler32-index)
(function).
adler32-next
(function).
barr
(function).
byte-array-to-int
(function).
cityhash-64-%seed
(function).
(setf cityhash-64-%seed)
(function).
cityhash-64-hash
(function).
cityhash-64-index
(function).
(setf cityhash-64-index)
(function).
cityhash-64-next
(function).
compute-ruiz-pi
(function).
compute-ruiz-pis-part1
(function).
copy-adler32
(function).
copy-cityhash-64
(function).
copy-hammersley
(function).
copy-kiss11
(function).
copy-linear-congruence
(function).
copy-mersenne-twister
(function).
copy-mersenne-twister-32
(function).
copy-mersenne-twister-64
(function).
copy-middle-square
(function).
copy-murmurhash3
(function).
copy-pcg
(function).
copy-quasi
(function).
copy-rc4
(function).
copy-sobol
(function).
copy-squirrel
(function).
copy-tt800
(function).
copy-xkcd
(function).
copy-xoroshiro-128**
(function).
copy-xoroshiro-128+
(function).
copy-xoroshiro-128++
(function).
copy-xoroshiro-64*
(function).
copy-xoroshiro-64**
(function).
copy-xorshift-1024*
(function).
copy-xorshift-128
(function).
copy-xorshift-128+
(function).
copy-xorshift-32
(function).
copy-xorshift-64
(function).
copy-xorshift-64*
(function).
copy-xorshift-generator
(function).
copy-xorwow
(function).
copy-xoshiro-128**
(function).
copy-xoshiro-128+
(function).
copy-xoshiro-128++
(function).
copy-xoshiro-256**
(function).
copy-xoshiro-256+
(function).
copy-xoshiro-256++
(function).
copy-xoshiro-generator
(function).
define-generator-fun
(macro).
define-pregenerated
(macro).
fit-bits
(compiler macro).
fit-bits
(function).
generator-p
(function).
hammersley-%seed
(function).
(setf hammersley-%seed)
(function).
hammersley-hash
(function).
hammersley-index
(function).
(setf hammersley-index)
(function).
hammersley-leap
(reader).
(setf hammersley-leap)
(writer).
hammersley-next
(function).
hash
(compiler macro).
hash
(generic function).
incfmod
(macro).
intern*
(function).
kiss11-%seed
(function).
(setf kiss11-%seed)
(function).
kiss11-carry
(reader).
(setf kiss11-carry)
(writer).
kiss11-cng
(reader).
(setf kiss11-cng)
(writer).
kiss11-j
(reader).
(setf kiss11-j)
(writer).
kiss11-next
(function).
kiss11-q
(reader).
(setf kiss11-q)
(writer).
kiss11-reseed
(function).
kiss11-xs
(reader).
(setf kiss11-xs)
(writer).
linear-congruence-%seed
(function).
(setf linear-congruence-%seed)
(function).
linear-congruence-increment
(reader).
(setf linear-congruence-increment)
(writer).
linear-congruence-multiplier
(reader).
(setf linear-congruence-multiplier)
(writer).
linear-congruence-next
(function).
linear-congruence-reseed
(function).
linear-congruence-state
(reader).
(setf linear-congruence-state)
(writer).
list-dim
(function).
make-adler32
(function).
make-cityhash-64
(function).
make-hammersley
(function).
make-kiss11
(function).
make-linear-congruence
(function).
make-mersenne-twister-32
(function).
make-mersenne-twister-64
(function).
make-middle-square
(function).
make-murmurhash3
(function).
make-pcg
(function).
make-quasi
(function).
make-rc4
(function).
make-sobol
(function).
make-squirrel
(function).
make-tt800
(function).
make-xkcd
(function).
make-xoroshiro-128**
(function).
make-xoroshiro-128+
(function).
make-xoroshiro-128++
(function).
make-xoroshiro-64*
(function).
make-xoroshiro-64**
(function).
make-xorshift-1024*
(function).
make-xorshift-128
(function).
make-xorshift-128+
(function).
make-xorshift-32
(function).
make-xorshift-64
(function).
make-xorshift-64*
(function).
make-xorwow
(function).
make-xoshiro-128**
(function).
make-xoshiro-128+
(function).
make-xoshiro-128++
(function).
make-xoshiro-256**
(function).
make-xoshiro-256+
(function).
make-xoshiro-256++
(function).
mersenne-twister
(structure).
mersenne-twister-%seed
(function).
(setf mersenne-twister-%seed)
(function).
mersenne-twister-32-%seed
(function).
(setf mersenne-twister-32-%seed)
(function).
mersenne-twister-32-index
(reader).
(setf mersenne-twister-32-index)
(writer).
mersenne-twister-32-lower
(reader).
(setf mersenne-twister-32-lower)
(writer).
mersenne-twister-32-magic
(reader).
(setf mersenne-twister-32-magic)
(writer).
mersenne-twister-32-matrix
(reader).
(setf mersenne-twister-32-matrix)
(writer).
mersenne-twister-32-next
(function).
mersenne-twister-32-reseed
(function).
mersenne-twister-32-upper
(reader).
(setf mersenne-twister-32-upper)
(writer).
mersenne-twister-64-%seed
(function).
(setf mersenne-twister-64-%seed)
(function).
mersenne-twister-64-index
(reader).
(setf mersenne-twister-64-index)
(writer).
mersenne-twister-64-lower
(reader).
(setf mersenne-twister-64-lower)
(writer).
mersenne-twister-64-magic
(reader).
(setf mersenne-twister-64-magic)
(writer).
mersenne-twister-64-matrix
(reader).
(setf mersenne-twister-64-matrix)
(writer).
mersenne-twister-64-next
(function).
mersenne-twister-64-reseed
(function).
mersenne-twister-64-upper
(reader).
(setf mersenne-twister-64-upper)
(writer).
mersenne-twister-index
(reader).
(setf mersenne-twister-index)
(writer).
middle-square-%seed
(function).
(setf middle-square-%seed)
(function).
middle-square-bits
(reader).
(setf middle-square-bits)
(writer).
middle-square-next
(function).
middle-square-reseed
(function).
middle-square-state
(reader).
(setf middle-square-state)
(writer).
murmurhash3-%seed
(function).
(setf murmurhash3-%seed)
(function).
murmurhash3-hash
(function).
murmurhash3-index
(function).
(setf murmurhash3-index)
(function).
murmurhash3-next
(function).
next-byte-fun
(generic function).
pcg-%seed
(function).
(setf pcg-%seed)
(function).
pcg-inc
(reader).
(setf pcg-inc)
(writer).
pcg-next
(function).
pcg-reseed
(function).
pcg-state
(reader).
(setf pcg-state)
(writer).
prime
(function).
quasi-%seed
(function).
(setf quasi-%seed)
(function).
quasi-last
(reader).
(setf quasi-last)
(writer).
quasi-next
(function).
quasi-reseed
(function).
quasi-source
(reader).
(setf quasi-source)
(writer).
rc4-%seed
(function).
(setf rc4-%seed)
(function).
rc4-index1
(reader).
(setf rc4-index1)
(writer).
rc4-index2
(reader).
(setf rc4-index2)
(writer).
rc4-next
(function).
rc4-reseed
(function).
rc4-state
(reader).
(setf rc4-state)
(writer).
rightzero32
(function).
sobol-%seed
(function).
(setf sobol-%seed)
(function).
sobol-a
(symbol macro).
sobol-a
(function).
sobol-b
(reader).
(setf sobol-b)
(writer).
sobol-dim
(reader).
(setf sobol-dim)
(writer).
sobol-init
(symbol macro).
sobol-init
(function).
sobol-m
(reader).
(setf sobol-m)
(writer).
sobol-mdata
(reader).
(setf sobol-mdata)
(writer).
sobol-n
(reader).
(setf sobol-n)
(writer).
sobol-next
(function).
sobol-reseed
(function).
sobol-x
(reader).
(setf sobol-x)
(writer).
splitmix32-array
(function).
splitmix64
(function).
splitmix64-array
(function).
squirrel-%seed
(function).
(setf squirrel-%seed)
(function).
squirrel-hash
(function).
squirrel-index
(function).
(setf squirrel-index)
(function).
squirrel-next
(function).
stateful-generator-%seed
(function).
(setf stateful-generator-%seed)
(function).
tt800-%seed
(function).
(setf tt800-%seed)
(function).
tt800-index
(reader).
(setf tt800-index)
(writer).
tt800-m
(reader).
(setf tt800-m)
(writer).
tt800-magic
(reader).
(setf tt800-magic)
(writer).
tt800-matrix
(reader).
(setf tt800-matrix)
(writer).
tt800-n
(reader).
(setf tt800-n)
(writer).
tt800-next
(function).
tt800-reseed
(function).
update
(macro).
xkcd-%seed
(function).
(setf xkcd-%seed)
(function).
xkcd-next
(function).
xkcd-reseed
(function).
xoroshiro-128**
(structure).
xoroshiro-128**-%seed
(function).
(setf xoroshiro-128**-%seed)
(function).
xoroshiro-128**-next
(function).
xoroshiro-128**-reseed
(function).
xoroshiro-128**-values
(reader).
(setf xoroshiro-128**-values)
(writer).
xoroshiro-128+
(structure).
xoroshiro-128++
(structure).
xoroshiro-128++-%seed
(function).
(setf xoroshiro-128++-%seed)
(function).
xoroshiro-128++-next
(function).
xoroshiro-128++-reseed
(function).
xoroshiro-128++-values
(reader).
(setf xoroshiro-128++-values)
(writer).
xoroshiro-128+-%seed
(function).
(setf xoroshiro-128+-%seed)
(function).
xoroshiro-128+-next
(function).
xoroshiro-128+-reseed
(function).
xoroshiro-128+-values
(reader).
(setf xoroshiro-128+-values)
(writer).
xoroshiro-64*
(structure).
xoroshiro-64**
(structure).
xoroshiro-64**-%seed
(function).
(setf xoroshiro-64**-%seed)
(function).
xoroshiro-64**-magic
(reader).
(setf xoroshiro-64**-magic)
(writer).
xoroshiro-64**-next
(function).
xoroshiro-64**-reseed
(function).
xoroshiro-64**-values
(reader).
(setf xoroshiro-64**-values)
(writer).
xoroshiro-64*-%seed
(function).
(setf xoroshiro-64*-%seed)
(function).
xoroshiro-64*-magic
(reader).
(setf xoroshiro-64*-magic)
(writer).
xoroshiro-64*-next
(function).
xoroshiro-64*-reseed
(function).
xoroshiro-64*-values
(reader).
(setf xoroshiro-64*-values)
(writer).
xorshift-1024*-%seed
(function).
(setf xorshift-1024*-%seed)
(function).
xorshift-1024*-index
(reader).
(setf xorshift-1024*-index)
(writer).
xorshift-1024*-magic
(reader).
(setf xorshift-1024*-magic)
(writer).
xorshift-1024*-next
(function).
xorshift-1024*-reseed
(function).
xorshift-1024*-values
(reader).
(setf xorshift-1024*-values)
(writer).
xorshift-1024*-xorshifts
(reader).
(setf xorshift-1024*-xorshifts)
(writer).
xorshift-128+-%seed
(function).
(setf xorshift-128+-%seed)
(function).
xorshift-128+-next
(function).
xorshift-128+-reseed
(function).
xorshift-128+-values
(reader).
(setf xorshift-128+-values)
(writer).
xorshift-128+-xorshifts
(reader).
(setf xorshift-128+-xorshifts)
(writer).
xorshift-128-%seed
(function).
(setf xorshift-128-%seed)
(function).
xorshift-128-next
(function).
xorshift-128-reseed
(function).
xorshift-128-values
(reader).
(setf xorshift-128-values)
(writer).
xorshift-128-xorshifts
(reader).
(setf xorshift-128-xorshifts)
(writer).
xorshift-32-%seed
(function).
(setf xorshift-32-%seed)
(function).
xorshift-32-next
(function).
xorshift-32-reseed
(function).
xorshift-32-value
(reader).
(setf xorshift-32-value)
(writer).
xorshift-32-xorshifts
(reader).
(setf xorshift-32-xorshifts)
(writer).
xorshift-64*-%seed
(function).
(setf xorshift-64*-%seed)
(function).
xorshift-64*-magic
(reader).
(setf xorshift-64*-magic)
(writer).
xorshift-64*-next
(function).
xorshift-64*-reseed
(function).
xorshift-64*-value
(reader).
(setf xorshift-64*-value)
(writer).
xorshift-64*-xorshifts
(reader).
(setf xorshift-64*-xorshifts)
(writer).
xorshift-64-%seed
(function).
(setf xorshift-64-%seed)
(function).
xorshift-64-next
(function).
xorshift-64-reseed
(function).
xorshift-64-value
(reader).
(setf xorshift-64-value)
(writer).
xorshift-64-xorshifts
(reader).
(setf xorshift-64-xorshifts)
(writer).
xorshift-generator
(structure).
xorshift-generator-%seed
(function).
(setf xorshift-generator-%seed)
(function).
xorshift-generator-xorshifts
(reader).
(setf xorshift-generator-xorshifts)
(writer).
xorshifts
(function).
xorwow-%seed
(function).
(setf xorwow-%seed)
(function).
xorwow-counter
(reader).
(setf xorwow-counter)
(writer).
xorwow-next
(function).
xorwow-reseed
(function).
xorwow-values
(reader).
(setf xorwow-values)
(writer).
xorwow-xorshifts
(reader).
(setf xorwow-xorshifts)
(writer).
xoshiro-128**-%seed
(function).
(setf xoshiro-128**-%seed)
(function).
xoshiro-128**-next
(function).
xoshiro-128**-reseed
(function).
xoshiro-128**-values
(reader).
(setf xoshiro-128**-values)
(writer).
xoshiro-128++
(structure).
xoshiro-128++-%seed
(function).
(setf xoshiro-128++-%seed)
(function).
xoshiro-128++-next
(function).
xoshiro-128++-reseed
(function).
xoshiro-128++-values
(reader).
(setf xoshiro-128++-values)
(writer).
xoshiro-128+-%seed
(function).
(setf xoshiro-128+-%seed)
(function).
xoshiro-128+-next
(function).
xoshiro-128+-reseed
(function).
xoshiro-128+-values
(reader).
(setf xoshiro-128+-values)
(writer).
xoshiro-256**-%seed
(function).
(setf xoshiro-256**-%seed)
(function).
xoshiro-256**-next
(function).
xoshiro-256**-reseed
(function).
xoshiro-256**-values
(reader).
(setf xoshiro-256**-values)
(writer).
xoshiro-256++
(structure).
xoshiro-256++-%seed
(function).
(setf xoshiro-256++-%seed)
(function).
xoshiro-256++-next
(function).
xoshiro-256++-reseed
(function).
xoshiro-256++-values
(reader).
(setf xoshiro-256++-values)
(writer).
xoshiro-256+-%seed
(function).
(setf xoshiro-256+-%seed)
(function).
xoshiro-256+-next
(function).
xoshiro-256+-reseed
(function).
xoshiro-256+-values
(reader).
(setf xoshiro-256+-values)
(writer).
xoshiro-generator
(structure).
xoshiro-generator-%seed
(function).
(setf xoshiro-generator-%seed)
(function).
xoshiro-rol32
(function).
xoshiro-rol64
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The default random number generator used by RANDOM.
See RANDOM
Define a new random number generator type.
BITS-PER-BYTE is a form that should evaluate to the byte spec for the
generator.
SUPER should be a list of the following structure:
SUPER ::= (type SLOT*)
SLOT ::= (slot-name initform)
type — The structure-type name to use as supertype
slot-name — The name of a slot in the supertype
initform — The initial value for the slot
SLOTS should be a list of additional structure slot specs to hold the
generator’s state.
BODIES should be any number of body expressions, each of which is a
list composed of a body type and any number of body forms, each of
which are evaluated in an environment where every specified slot in
SLOTS as well as every specified supertype slot in SUPER is
symbol-macrolet-bound to their respective name. The following body
types are permitted:
:COPY — Provides the body forms for the COPY function. The
generator instance is bound to GENERATOR. If this body
expression is not provided, a copy function based on the
SLOTS is automatically provided for you.
This must be provided for HASH-GENERATORs.
:RESEED — Provides the body forms for the RESEED function. The
generator instance is bound to GENERATOR and the seed to
SEED.
This must be provided for STATEFUL-GENERATORs.
:NEXT — Provides the body forms for the NEXT-BYTE function. The
generator instance is bound to GENERATOR. Must return a
suitable byte for the generator.
This must be provided for STATEFUL-GENERATORs.
:HASH — Provides the stateless hashing function. The generator
instance is notably NOT bound. However, the 64-bit index
to hash is bound to INDEX. This will also automatically
provide the NEXT-BYTE function for you.
This must be provided for HASH-GENERATORs.
Each of the additional bindings in the body expressions is bound to a
symbol from the current package.
See BITS-PER-BYTE
See RESEED
See NEXT-BYTE
See HASH
See COPY
See HASH-GENERATOR
See STATEFUL-GENERATOR
See GENERATOR
Draw a number of samples from an NRG and determine how quickly it operates.
Prints the duration, # samples, samples/s, and s/sample to STREAM.
Returns samples/s.
See BENCHMARK-ALL
Run a benchmark for all known generator types.
When completed, orders the the results from fastest to slowest and
prints them to STREAM. If a generator fails to be benchmarked, its
result is shown as -1.
See BENCHMARK
Returns a vector with N random samples in [0,1[.
See ENSURE-GENERATOR
See RANDOM-UNIT
Ensures the argument is an object usable for random number generation.
See GLOBAL-GENERATOR
See GENERATOR
Returns a global instance of a generator.
You may also SETF this place to name specific generators of your own.
See MAKE-GENERATOR
Compute a histogram from the given sample vector.
This will collect the samples into N bins, where the value of the bin is the contribution of the samples in the bin towards all samples.
See PRINT-HISTOGRAM
See DRAW
Attempts to find a sufficiently random seed.
On Unix, this reads 64 bits from /dev/urandom
On Windows+SBCL, this reads 64 bits from SB-WIN32:CRYPT-GEN-RANDOM
Otherwise it uses an XOR of GET-INTERNAL-REAL-TIME and GET-UNIVERSAL-TIME.
Accesses the index of the hash-generator.
The index must be an (unsigned-byte 64).
The index is advanced for each call to NEXT-BYTE.
See HASH-GENERATOR
Lists the types of generators supported by the library.
You may use any of these types to call MAKE-GENERATOR with.
See MAKE-GENERATOR
Creates a new generator of the given type.
You may pass an optional seed to initialise the generator with. If no
seed is specified, each constructed generator of the same type will
return the same sequence of numbers.
See RESEED
See GENERATOR
Returns true if the generator is multivariate and returns an array of bytes on NEXT-BYTE.
See NEXT-BYTE
See GENERATOR
Display the histogram vector in a user-friendly manner.
Prints a visual representation of the deviation of each bin from the
ideal uniform distribution as well as the cumulative deviation of all
bins.
See HISTOGRAM
Returns a number in [0, MAX[.
This is a drop-in replacement for CL:RANDOM.
The returned type is the same as MAX, where MAX must be an INTEGER or
a FLOAT greater than zero. The returned number must be smaller than MAX.
GENERATOR may be anything accepted by ENSURE-GENERATOR.
See RANDOM-INT
See RANDOM-FLOAT
See ENSURE-GENERATOR
Returns a byte for the given index and seed.
This is only usable with HASH-GENERATOR types.
Does *NOT* advance the generator’s index.
See HASH-GENERATOR
See NEXT-BYTE
Returns a byte for the given location and seed.
This is only usable with HASH-GENERATOR types.
Does *NOT* advance the generator’s index.
See HASH-GENERATOR
See NEXT-BYTE
Returns a byte for the given location and seed.
This is only usable with HASH-GENERATOR types.
Does *NOT* advance the generator’s index.
See HASH-GENERATOR
See NEXT-BYTE
Alias for NEXT-BYTE.
See GENERATOR See NEXT-BYTE
Returns an (UNSIGNED-BYTE BITS) sized random number.
May advance the generator more than once.
See GENERATOR
See NEXT-BYTE
Returns a random float in [FROM, TO].
The returned float is of the same type as whatever type is larger
between FROM and TO.
See GENERATOR
See RANDOM-UNIT
Returns a random integer in [FROM, TO].
See GENERATOR
See RANDOM-BYTES
Fills SEQUENCE between START and END with random numbers.
Note: it is up to you to ensure that SEQUENCE is capable of holding
numbers returned by the generator’s NEXT-BYTE, and that doing so makes
sense. As in, do not fill a vector with element-type (unsigned-byte 8)
with a generator whose BITS-PER-BYTE is 32 or vice-versa.
Equivalent to:
(map-into sequence (lambda () (next-byte generator)))
See GENERATOR
See NEXT-BYTE
Returns a random float in [0, 1].
The returned float is of the type specified in TYPE.
see GENERATOR
See RANDOM-BYTES
Returns the number of bits of randomness returned by the generator for each NEXT-BYTE call.
This may either be an integer, describing the bits of randomness returned,
the symbol SINGLE-FLOAT or DOUBLE-FLOAT in which case NEXT-BYTE returns a unit float,
or a list composed of the aforementioned, in which case NEXT-BYTE returns an array
of such bytes.
See NEXT-BYTE
See GENERATOR
random-state
)) ¶xoroshiro-128**
)) ¶xoroshiro-128++
)) ¶xoroshiro-128+
)) ¶xoroshiro-64**
)) ¶xoroshiro-64*
)) ¶xoshiro-256+
)) ¶xoshiro-256++
)) ¶xoshiro-256**
)) ¶xoshiro-128+
)) ¶xoshiro-128++
)) ¶xoshiro-128**
)) ¶xorshift-128+
)) ¶xorshift-1024*
)) ¶xorshift-64*
)) ¶xorshift-128
)) ¶xorshift-64
)) ¶xorshift-32
)) ¶murmurhash3
)) ¶middle-square
)) ¶mersenne-twister-64
)) ¶mersenne-twister-32
)) ¶linear-congruence
)) ¶hammersley
)) ¶cityhash-64
)) ¶symbol
)) ¶Creates a fresh copy of the given generator.
This copy will return an identical sequence of bytes as the
original. Meaning, the following invariant holds true:
(loop with copy = (copy generator) always (= (next-byte generator) (next-byte copy)))
See GENERATOR
random-state
)) ¶xoroshiro-128**
)) ¶xoroshiro-128++
)) ¶xoroshiro-128+
)) ¶xoroshiro-64**
)) ¶xoroshiro-64*
)) ¶xoshiro-256+
)) ¶xoshiro-256++
)) ¶xoshiro-256**
)) ¶xoshiro-128+
)) ¶xoshiro-128++
)) ¶xoshiro-128**
)) ¶xorshift-128+
)) ¶xorshift-1024*
)) ¶xorshift-64*
)) ¶xorshift-128
)) ¶xorshift-64
)) ¶xorshift-32
)) ¶murmurhash3
)) ¶middle-square
)) ¶mersenne-twister-64
)) ¶mersenne-twister-32
)) ¶linear-congruence
)) ¶hammersley
)) ¶cityhash-64
)) ¶array
)) ¶number
)) ¶symbol
)) ¶Returns the next byte (not octet) of random state.
The value returned is in accordance to the spec of BITS-PER-BYTE.
If the spec is an integer, the returned integer must be in the range
of
[ 0, 1 << BITS-PER-BYTE GENERATOR [
If the spec is SINGLE-FLOAT or DOUBLE-FLOAT, the returned float must
be in the range of
[ 0, 1 [
If the spec is a list, the returned value is an array with each of its
elements according to the above description.
See RANDOM-INT
See RANDOM-BYTES
See GENERATOR
random-state
)) ¶xoroshiro-128**
)) ¶xoroshiro-128++
)) ¶xoroshiro-128+
)) ¶xoroshiro-64**
)) ¶xoroshiro-64*
)) ¶xoshiro-256+
)) ¶xoshiro-256++
)) ¶xoshiro-256**
)) ¶xoshiro-128+
)) ¶xoshiro-128++
)) ¶xoshiro-128**
)) ¶xorshift-128+
)) ¶xorshift-1024*
)) ¶xorshift-64*
)) ¶xorshift-128
)) ¶xorshift-64
)) ¶xorshift-32
)) ¶murmurhash3
)) ¶middle-square
)) ¶mersenne-twister-64
)) ¶mersenne-twister-32
)) ¶linear-congruence
)) ¶hammersley
)) ¶cityhash-64
)) ¶symbol
)) ¶Reset the RNG and seed it with the given seed number.
If T is passed for the new seed, a random seed as determined by
HOPEFULLY-SUFFICIENTLY-RANDOM-SEED is used.
See HOPEFULLY-SUFFICIENTLY-RANDOM-SEED
See GENERATOR
random-state
) seed) ¶xoroshiro-128**
) (new-seed integer
)) ¶xoroshiro-128++
) (new-seed integer
)) ¶xoroshiro-128+
) (new-seed integer
)) ¶xoroshiro-64**
) (new-seed integer
)) ¶xoroshiro-64*
) (new-seed integer
)) ¶xoshiro-256+
) (new-seed integer
)) ¶xoshiro-256++
) (new-seed integer
)) ¶xoshiro-256**
) (new-seed integer
)) ¶xoshiro-128+
) (new-seed integer
)) ¶xoshiro-128++
) (new-seed integer
)) ¶xoshiro-128**
) (new-seed integer
)) ¶xorshift-128+
) (new-seed integer
)) ¶xorshift-1024*
) (new-seed integer
)) ¶xorshift-64*
) (new-seed integer
)) ¶xorshift-128
) (new-seed integer
)) ¶xorshift-64
) (new-seed integer
)) ¶xorshift-32
) (new-seed integer
)) ¶middle-square
) (new-seed integer
)) ¶mersenne-twister-64
) (new-seed integer
)) ¶mersenne-twister-32
) (new-seed integer
)) ¶linear-congruence
) (new-seed integer
)) ¶hash-generator
) (seed integer
)) ¶symbol
) new-seed) ¶Rewind the hash-generator by BY numbers.
The following invariant holds for any N:
(= (next-byte generator) (progn (rewind generator N) (loop repeat (1- N) (next-byte generator)) (next-byte generator)))
See HASH-GENERATOR
hash-generator
) &optional by) ¶symbol
) &optional by) ¶Returns the seed that was used to initialise the generator.
See GENERATOR
An RNG based on the Adler32 hash.
See https://en.wikipedia.org/wiki/Adler-32
An RNG based on the 64-bit CityHash.
See https://github.com/google/cityhash
General class for any random number generator.
See LIST-GENERATOR-TYPES
See SEED
See RESEED
See NEXT-BYTE
See BITS-PER-BYTE
See COPY
See MULTIVARIATE-P
See MAKE-GENERATOR
See STATEFUL-GENERATOR
See HASH-GENERATOR
structure-object
.
(unsigned-byte 64)
0
The Hammersley quasi-random number sequence.
This is a multivariate generator with default dimensionality of 3.
To change the dimensionality, pass a :LEAP initarg that is an array of
the desired dimensionality. Each element in the LEAP array should be
an integer greater or equal to 1, and can be used to advance the
sequence more quickly for each dimension.
See https://en.wikipedia.org/wiki/Low-discrepancy_sequence
(simple-array (unsigned-byte 32) (*))
(make-array 3 :element-type (quote (unsigned-byte 32)) :initial-element 1)
Superclass for all generators that rely on a hashing function to generate numbers.
These generators are special in that numbers for any index can be
generated, so they can be rewound or arbitrarily stepped in their
sequence.
See GENERATOR
See INDEX
See REWIND
(unsigned-byte 64)
0
An implementation of the Kiss11 RNG.
See https://eprint.iacr.org/2011/007.pdf
(simple-array (unsigned-byte 32) (4194304))
(random-state::32bit-seed-array 4194304 0)
(unsigned-byte 32)
0
(unsigned-byte 32)
4194303
(unsigned-byte 32)
123456789
(unsigned-byte 32)
362436069
A very simple random number generator based on linear congruence.
See https://en.wikipedia.org/wiki/Linear_congruential_generator
(unsigned-byte 64)
0
(unsigned-byte 64)
6364136223846793005
(unsigned-byte 64)
1442695040888963407
The de-facto standard random number generator algorithm.
See https://en.wikipedia.org/wiki/Mersenne_Twister See http://www.acclab.helsinki.fi/~knordlun/mc/mt19937.c
(unsigned-byte 64)
624
(unsigned-byte 32)
2147483648
(unsigned-byte 32)
2147483647
(simple-array (unsigned-byte 32) (2))
(random-state::barr 32 0 2567483615)
(simple-array (unsigned-byte 32) (624))
(make-array 624 :element-type (sb-int:quasiquote (unsigned-byte 32)))
A 64 bit variant of the Mersenne Twister algorithm.
See MERSENNE-TWISTER-32
See http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/VERSIONS/C-LANG/mt19937-64.c
(unsigned-byte 64)
312
(unsigned-byte 64)
18446744071562067968
(unsigned-byte 64)
2147483647
(simple-array (unsigned-byte 64) (2))
(random-state::barr 64 0 13043109905998158313)
(simple-array (unsigned-byte 64) (312))
(make-array 312 :element-type (sb-int:quasiquote (unsigned-byte 64)))
An incredibly primitive, and basically in practise useless, random number algorithm.
See https://en.wikipedia.org/wiki/Middle-square_method
A hash-based RNG using the Murmurhash3 method.
See https://en.wikipedia.org/wiki/MurmurHash
An adaptation of the PCG rng.
See http://www.pcg-random.org
A quasi-random number generator based on a uniform RNG.
When constructing the generator you may pass the :SOURCE initarg, which should be a GENERATOR instance to use as a source of randomness. By default the current value of *GENERATOR* is used.
See https://en.wikipedia.org/wiki/Low-discrepancy_sequence
The RC4 cryptographic random number generator.
See https://en.wikipedia.org/wiki/RC4
(unsigned-byte 8)
0
(unsigned-byte 8)
0
(simple-array (unsigned-byte 8) (256))
(make-array 256 :element-type (quote (unsigned-byte 8)))
The Sobol quasi-random number sequence.
This is a multivariate generator with default dimensionality of 3.
You can pass the :DIM initarg to specify the dimensionality of the
result. :DIM must be in [ 1, 1111 [
See https://en.wikipedia.org/wiki/Low-discrepancy_sequence
(unsigned-byte 16)
3
(simple-array (unsigned-byte 32) (*))
(make-array 0 :element-type (quote (unsigned-byte 32)))
(simple-array (unsigned-byte 8) (32))
(make-array 32 :element-type (quote (unsigned-byte 8)))
(simple-array (unsigned-byte 32) (*))
(make-array 0 :element-type (quote (unsigned-byte 32)))
(simple-array (unsigned-byte 32) (*))
(make-array 0 :element-type (quote (unsigned-byte 32)))
(unsigned-byte 32)
0
An adaptation of the "squirrel hash v3".
See https://www.youtube.com/watch?v=LWFzPP8ZbdU
Superclass for all generators that rely on state to produce random numbers.
See GENERATOR
The predecessor to the Mersenne Twister algorithm.
See http://random.mat.sbg.ac.at/publics/ftp/pub/data/tt800.c
(simple-array (unsigned-byte 32) (2))
(random-state::barr 32 0 2394935336)
(unsigned-byte 8)
25
(unsigned-byte 8)
7
(unsigned-byte 64)
0
(simple-array (unsigned-byte 32) (25))
(make-array 25 :element-type (sb-int:quasiquote (unsigned-byte 32)))
XKCD-221 random number generator
See https://xkcd.com/221/
Sixteen 64-bit word state variation of XORSHIFT-64*.
See XORSHIFT-64*
(simple-array (signed-byte 16) (3))
(random-state::xorshifts 31 -11 30)
(unsigned-byte 4)
0
(unsigned-byte 64)
1181783497276652981
common-lisp
.
(simple-array (unsigned-byte 64) (16))
(make-array 16 :element-type (quote (unsigned-byte 64)))
The four times 32-bit word state variant of the Xorshift algorithm.
See XORSHIFT-32
(simple-array (signed-byte 16) (3))
(random-state::xorshifts 11 -8 -19)
common-lisp
.
(simple-array (unsigned-byte 32) (4))
(make-array 4 :element-type (quote (unsigned-byte 32)))
Non-linear double 64-bit state variant of XORSHIFT-64 that’s currently the standard on modern browsers’ JavaScript engines.
See XORSHIFT-64
See https://en.wikipedia.org/wiki/Xorshift#xorshift+
See https://v8.dev/blog/math-random
(simple-array (signed-byte 16) (3))
(random-state::xorshifts 23 -18 -5)
common-lisp
.
(simple-array (unsigned-byte 64) (2))
(make-array 2 :element-type (quote (unsigned-byte 64)))
Linear 32-bit word state shift-register generator.
See https://en.wikipedia.org/wiki/Xorshift
See https://www.jstatsoft.org/article/view/v008i14
The 64-bit variant of the Xorshift algorithm..
See XORSHIFT-32
Non-linear variation of XORSHIFT-64 by adding a modulo multiplier.
See XORSHIFT-64
See https://en.wikipedia.org/wiki/Xorshift#xorshift*
(simple-array (signed-byte 16) (3))
(random-state::xorshifts -12 25 -27)
(unsigned-byte 64)
0
(unsigned-byte 64)
2685821657736338717
Non-linear five times 32-bit word state shift-register generator.
See XORSHIFT-128
See https://en.wikipedia.org/wiki/Xorshift#xorwow
(simple-array (signed-byte 16) (3))
(random-state::xorshifts -2 1 4)
(unsigned-byte 32)
0
common-lisp
.
(simple-array (unsigned-byte 32) (5))
(make-array 5 :element-type (quote (unsigned-byte 32)))
32-bit variant of XOSHIRO-256**.
See XOSHIRO-256**
See https://prng.di.unimi.it/xoshiro128starstar.c
common-lisp
.
(simple-array (unsigned-byte 32) (4))
(make-array 4 :element-type (quote (unsigned-byte 32)))
32-bit variant of XOSHIRO-256+.
See XOSHIRO-256+
See https://prng.di.unimi.it/xoshiro128plus.c
common-lisp
.
(simple-array (unsigned-byte 32) (4))
(make-array 4 :element-type (quote (unsigned-byte 32)))
Non-linear rotating general-purpose 64-bit number algorithm.
See https://prng.di.unimi.it/
See https://prng.di.unimi.it/xoshiro256starstar.c
See https://en.wikipedia.org/wiki/Xorshift#xoshiro
common-lisp
.
(simple-array (unsigned-byte 64) (4))
(make-array 4 :element-type (quote (unsigned-byte 64)))
Slightly faster variant of XOSHIRO-256++ meant solely for generating 64-bit floating-point numbers by extracting the upper 53-bits due to the linearity of the lower bits.
See XOSHIRO-256++
See https://prng.di.unimi.it/xoshiro256plus.c
common-lisp
.
(simple-array (unsigned-byte 64) (4))
(make-array 4 :element-type (quote (unsigned-byte 64)))
leap
.
cng
.
bits
.
last
.
dim
.
(eql random-state)
) &key) ¶(eql random-state::xoroshiro-128**)
) &rest initargs &key &allow-other-keys) ¶(eql random-state::xoroshiro-128++)
) &rest initargs &key &allow-other-keys) ¶(eql random-state::xoroshiro-128+)
) &rest initargs &key &allow-other-keys) ¶(eql random-state::xoroshiro-64**)
) &rest initargs &key &allow-other-keys) ¶(eql random-state::xoroshiro-64*)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xoshiro-256+)
) &rest initargs &key &allow-other-keys) ¶(eql random-state::xoshiro-256++)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xoshiro-256**)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xoshiro-128+)
) &rest initargs &key &allow-other-keys) ¶(eql random-state::xoshiro-128++)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xoshiro-128**)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xorshift-128+)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xorshift-1024*)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xorshift-64*)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xorwow)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xorshift-128)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xorshift-64)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xorshift-32)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:xkcd)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:tt800)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:squirrel)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:sobol)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:rc4)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:quasi)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:pcg)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:murmurhash3)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:middle-square)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:mersenne-twister-64)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:mersenne-twister-32)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:kiss11)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:linear-congruence)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:hammersley)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:cityhash-64)
) &rest initargs &key &allow-other-keys) ¶(eql random-state:adler32)
) &rest initargs &key &allow-other-keys) ¶symbol
) &rest args) ¶stateful-generator
) &key) ¶murmurhash3
) index seed) ¶hammersley
) index seed) ¶cityhash-64
) index seed) ¶symbol
) index seed) ¶random-state
)) ¶xoroshiro-128**
)) ¶xoroshiro-128++
)) ¶xoroshiro-128+
)) ¶xoroshiro-64**
)) ¶xoroshiro-64*
)) ¶xoshiro-256+
)) ¶xoshiro-256++
)) ¶xoshiro-256**
)) ¶xoshiro-128+
)) ¶xoshiro-128++
)) ¶xoshiro-128**
)) ¶xorshift-128+
)) ¶xorshift-1024*
)) ¶xorshift-64*
)) ¶xorshift-128
)) ¶xorshift-64
)) ¶xorshift-32
)) ¶murmurhash3
)) ¶middle-square
)) ¶mersenne-twister-64
)) ¶mersenne-twister-32
)) ¶linear-congruence
)) ¶hammersley
)) ¶cityhash-64
)) ¶(unsigned-byte 64)
0
Non-linear rotating general-purpose 64-bit number algorithm that is similar to Xoshiro-256** but uses less space.
See XOSHIRO-256**
See https://prng.di.unimi.it/
See https://prng.di.unimi.it/xoroshiro128starstar.c
See https://en.wikipedia.org/wiki/Xoroshiro128%2B
common-lisp
.
(simple-array (unsigned-byte 64) (2))
(make-array 2 :element-type (quote (unsigned-byte 64)))
A variant of XOROSHIRO-128++ that is slightly faster. It is suggested to be used for generating 64-bit floating-point values using its upper 53 bits and random boolean values using a sign test.
See XOROSHIRO-128++
See https://prng.di.unimi.it/xoroshiro128plus.c
common-lisp
.
(simple-array (unsigned-byte 64) (2))
(make-array 2 :element-type (quote (unsigned-byte 64)))
A variant of XOROSHIRO-128** using addition instead of multiplication.
See XOROSHIRO-128**
See https://prng.di.unimi.it/xoroshiro128plusplus.c
common-lisp
.
(simple-array (unsigned-byte 64) (2))
(make-array 2 :element-type (quote (unsigned-byte 64)))
Slightly faster variant of XOROSHIRO-64** meant solely for generating 32-bit floating-point numbers by extracting the upper 26-bits due to the linearity of the lower bits.
See XOROSHIRO-64**
See https://prng.di.unimi.it/xoroshiro64star.c
32-bit variant of XOROSHIRO-128**.
See XOROSHIRO-128**
See https://prng.di.unimi.it/xoroshiro64starstar.c
(simple-array (signed-byte 16) (3))
(make-array 3 :element-type (quote (signed-byte 16)))
32-bit variant of XOSHIRO-256++.
See XOSHIRO-256++
See https://prng.di.unimi.it/xoshiro128plus.c
common-lisp
.
(simple-array (unsigned-byte 32) (4))
(make-array 4 :element-type (quote (unsigned-byte 32)))
A variant of XOSHIRO-256** using addition instead of multiplication.
See XOSHIRO-256**
See https://prng.di.unimi.it/xoshiro256plusplus.c
common-lisp
.
(simple-array (unsigned-byte 64) (4))
(make-array 4 :element-type (quote (unsigned-byte 64)))
Jump to: | %
(
3
6
A B C D E F G H I K L M N P Q R S T U X |
---|
Jump to: | %
(
3
6
A B C D E F G H I K L M N P Q R S T U X |
---|
Jump to: | %
*
B C D I J L M N Q S U V X |
---|
Jump to: | %
*
B C D I J L M N Q S U V X |
---|
Jump to: | A C D F G H I K L M P Q R S T X |
---|
Jump to: | A C D F G H I K L M P Q R S T X |
---|