[MLton-commit] r5050

Vesa Karvonen vesak at mlton.org
Fri Jan 12 04:33:45 PST 2007


Initial commit of a lib of misc utils to be refactored.
----------------------------------------------------------------------

A   mltonlib/trunk/com/ssh/misc-util/unstable/rng.sig

----------------------------------------------------------------------

Added: mltonlib/trunk/com/ssh/misc-util/unstable/rng.sig
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/rng.sig	2007-01-12 12:33:24 UTC (rev 5049)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/rng.sig	2007-01-12 12:33:38 UTC (rev 5050)
@@ -0,0 +1,26 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(*
+ * Signature for functional random number generators.
+ *)
+
+signature RNG = sig
+   type t
+   (** The type of random number generator state or seed. *)
+
+   val value : t -> Word.t
+   (** Extracts the current random word from the seed. *)
+
+   val next : t UnOp.t
+   (** Computes the next seed. *)
+
+   val split : Word.t -> t UnOp.t
+   (** Computes a new seed based on the given seed and word index. *)
+
+   val maxValue : Word.t
+   (** The range of generated random words is {{0w0, ..., maxValue}}. *)
+end


Property changes on: mltonlib/trunk/com/ssh/misc-util/unstable/rng.sig
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the MLton-commit mailing list