4 ;;; Author: AJ Rossini <blindglobe@gmail.com>
5 ;;; Copyright: (c)2008, AJ Rossini. BSD, LLGPL, or GPLv2, depending
7 ;;; Purpose: random number streams, serial and parallel
8 ;;; Time-stamp: <2008-03-11 19:18:48 user>
9 ;;; Creation: <2008-03-11 19:18:34 user>
11 ;;; What is this talk of 'release'? Klingons do not make software
12 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
13 ;;; designers and quality assurance people in its wake.
15 ;;; This organization and structure is new to the 21st Century
18 ;;; Lispy implementation of random numbers. Initially, we leverage
19 ;;; existing code before "improving" (which is an ill-definded action
24 (defpackage :lisp-stat-random
29 probability-density-function cumulative-density-function
32 (in-package :lisp-stat-random
)
34 (defstruct probability-types
41 "Current global state of all pRNGs that might be active. This needs
42 to be aware that it should be thread-safe, so might be a list of
45 (defvar *current-rng
* nil
46 "How do we understand this in a thread-safe manner?")
48 (defun rng-seed (&opt value specification
)
49 "For getting and setting a particular rng with a particular seed,
50 Returns the current seed, even (especially!) if there is nothing to
52 (if (and specification value
)
54 (set-rng-type specification
)
55 (if value
(setf *seed
* value
)))
56 (if value
(setf *seed
* value
)))