Click or drag to resize

Ran001 Class

Ran001: combined congruential with shuffle. Returns integer random numbers uniformly distributed within [0,2147483646].
Inheritance Hierarchy
SystemObject
  Altaxo.Calc.Probability.OldRandomGenerator
    Altaxo.Calc.Probability.OldRan001

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

The Ran001 type exposes the following members.

Constructors
 NameDescription
Public methodRan001Initializes a new instance of the Ran001 class
Public methodRan001(UInt32)Initializes a new instance of the Ran001 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#
Notes: - Minimal random number generator of Park and Miller with
         Bays-Durham shuffle and added safeguards.

       - The period is 2^31-2 = 2.1*10^9. If your application needs
    more numbers in sequence than 1% of the random generators period,
    i.e. 10^7, then use a more elaborate random generator.
         There are no statistical tests known that it fails to pass, execpt
         when the number of calls starts to become on the order of the period.
    When you need longer random sequences you should use
         another random generator, for example Ran002 or Ran013.

       - Reference:
         Algorithm "ran1" published in "Portable Random Number Generators",
         William H. Press and Saul A. Teukolsky
         Computers in Phyics, Vol. 6, No. 5, Sep/Oct 1992

       - At least 32 bit long int is required, but works with any larger
    word lengths
See Also