From 84d80ace3c51f639513cbadd01a88f4389f1cdd7 Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Thu, 16 Apr 2009 17:17:31 +0200 Subject: [PATCH] pRNG from a different source/package --- src/rng/random.lisp | 60 ----------------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 src/rng/random.lisp diff --git a/src/rng/random.lisp b/src/rng/random.lisp deleted file mode 100644 index 338dfd4..0000000 --- a/src/rng/random.lisp +++ /dev/null @@ -1,60 +0,0 @@ -;;; -*- mode: lisp -*- - -;;; File: random.lisp -;;; Author: AJ Rossini -;;; Copyright: (c)2008, AJ Rossini. BSD, LLGPL, or GPLv2, depending -;;; on how it arrives. -;;; Purpose: random number streams, serial and parallel -;;; Time-stamp: <2008-03-11 19:18:48 user> -;;; Creation: <2008-03-11 19:18:34 user> - -;;; What is this talk of 'release'? Klingons do not make software -;;; 'releases'. Our software 'escapes', leaving a bloody trail of -;;; designers and quality assurance people in its wake. - -;;; This organization and structure is new to the 21st Century -;;; version. - -;;; Lispy implementation of random numbers. Initially, we leverage -;;; existing code before "improving" (which is an ill-definded action -;;; to do). - -(in-package :cl-user) - -(defpackage :lisp-stat-random - (:use :common-lisp) - (:export *seed* rng - variate - quantile - probability-density-function cumulative-density-function - probability-types)) - -(in-package :lisp-stat-random) - -(defstruct probability-types - (list (1 . normal) - (2 . t) - (3 . cauchy) - (4 . gamma))) - -(defvar *seed* nil - "Current global state of all pRNGs that might be active. This needs -to be aware that it should be thread-safe, so might be a list of -indexible triples.") - -(defvar *current-rng* nil - "How do we understand this in a thread-safe manner?") - -(defun rng-seed (&opt value specification) - "For getting and setting a particular rng with a particular seed, -Returns the current seed, even (especially!) if there is nothing to -set." - (if (and specification value) - (progn - (set-rng-type specification) - (if value (setf *seed* value))) - (if value (setf *seed* value))) - *seed*) - - - -- 2.11.4.GIT