Click or drag to resize

Ran002 Class

Ran002: combined congruential with shuffle. Returns an integer random number uniformly distributed within [1,2147483562]. This generator is very slow.
Inheritance Hierarchy
SystemObject
  Altaxo.Calc.Probability.OldRandomGenerator
    Altaxo.Calc.Probability.OldRan002

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

The Ran002 type exposes the following members.

Constructors
 NameDescription
Public methodRan002Initializes a new instance of the Ran002 class
Public methodRan002(UInt32)Initializes a new instance of the Ran002 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)
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#
Reference:
 (1) This is the long period ( > 2.3 * 10^18 ) random number generator of
     P. L'Ecuyer, Commun. ACM 31, 743 (1988), but with Bays-Durham shuffle
     and "added safeguards" as proposed by
 (2) William H. Press and Saul A. Teukolsky,
     "Portable Random Number Generators",
     Computers in Phyics, Vol. 6, No. 5, Sep/Oct 1992, Algorithm "ran2"
 (3) This generator has been validated also by
     G. Marsaglia and A. Zaman,
     "Some portable very-long-period random number generators",
     Computers in Physics, Vol. 8, No. 1, Jan/Feb 1994.

Notes:
  -  William Press and Saul Teukolsky think that this is a "perfect"
     random generator and will pay $1000 for the first one who convinces
     them otherwise.
See Also