Ran004 Type

Ran004: W.H. Press/S.A. Teukolsky: Numerical recipies pseudo-DES ran4. Returns an integer random number uniformly distributed within [0,4294967295].

             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!)

Constructors

Constructor Description

Ran004()

Full Usage: Ran004()

Ran004(the_seed)

Full Usage: Ran004(the_seed)

Parameters:
    the_seed : uint32

the_seed : uint32

Instance members

Instance member Description

this.Long

Full Usage: this.Long

Returns: uint32
Modifiers: abstract

Returns: uint32

this.Long

Full Usage: this.Long

Parameters:
    new_seed : uint32
    nth : uint32

Returns: uint32
Modifiers: abstract

new_seed : uint32
nth : uint32
Returns: uint32