API for probabilities.random-numbers
- ()
by Konrad Hinsen
Usage:
(ns your-namespace
(:require clojure.contrib.probabilities.random-numbers))
Overview
Random number streams
This library provides random number generators with a common
stream interface. They all produce pseudo-random numbers that are
uniformly distributed in the interval [0, 1), i.e. 0 is a
possible value but 1 isn't. For transformations to other
distributions, see clojure.contrib.probabilities.monte-carlo.
At the moment, the only generator provided is a rather simple
linear congruential generator.
Public Variables and Functions
lcg
function
Usage: (lcg modulus multiplier increment seed)
Create a linear congruential generator
Source
rand-stream
var
A random number stream based on clojure.core/rand. Note that this
generator uses an internal mutable state. The state is thus not stored
in the stream object and cannot be restored.
Source