Click or drag to resize

Ran004 Class

Ran004: W.H. Press/S.A. Teukolsky: Numerical recipies pseudo-DES ran4. Returns an integer random number uniformly distributed within [0,4294967295].
Inheritance Hierarchy
SystemObject
  Altaxo.Calc.Probability.OldRandomGenerator
    Altaxo.Calc.Probability.OldRan004

Namespace: Altaxo.Calc.Probability.Old
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public class Ran004 : RandomGenerator

The Ran004 type exposes the following members.

Constructors
 NameDescription
Public methodRan004Initializes a new instance of the Ran004 class
Public methodRan004(UInt32)Initializes a new instance of the Ran004 class
Top
Properties
 NameDescription
Public propertyMaximumThe maximum value of the random number which can be returned.
(Inherited from RandomGenerator)
Public propertySeedThe seed value.
(Inherited from RandomGenerator)
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodLong
(Overrides RandomGeneratorLong)
Public methodLong(UInt32, UInt32) 
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Fields
 NameDescription
Protected fieldmax_valUniform long int values within [0...max_val].
(Inherited from RandomGenerator)
Protected fieldseedThe seed of the random generator.
(Inherited from RandomGenerator)
Top
Remarks
C#
The period length for one seed is 2^32, but the seed is incremented
automatically if the series for one seed is exhausted. There are
2^32 possible seeds.

Notes:

a) The original version of Ref. (1) is not portable to machines with larger
   word lengths. That means different random sequences are obtained for
   32-bit long integers and 64-bit long integers.
   This version is made portable by using bit-masks. The run time penalty
   is neglegible.
b) The random sequence for one seed has only a period of maximally 2^32.
   This is definitly to short for nowadays MC simulations. In this version
   the seed is automatically incremented to jump to the next segment
   when one segment is exhausted.
c) Also the extremely inconvenient interface of the original
   has been changed.

Reference:
  (1) W.H. Press, S.A. Teukolsky, Vetterling, Teukolsky,
      Numerical Recipies in C, 2nd edition, 1992.
  (2) Major modifications a) to c) and inclusion into Matpack
      by B. M. Gammel, Apr 1, 1997 (no joke!)
See Also