cz.cuni.jagrlib
Class RandomStatic

java.lang.Object
  extended by cz.cuni.jagrlib.RandomStatic

public class RandomStatic
extends java.lang.Object

Simple static pseudo-random generators. Mostly LCG (Linear Congruential Generators).

Since:
0.24
See Also:
RandomStatic.java

Field Summary
protected static long BITS_31
           
protected static long BITS_32
           
 
Constructor Summary
RandomStatic()
           
 
Method Summary
static long ibmRandu(long v)
          LCG pseudo-random generator: IBM randu.
static long ibmRanduMax()
          max + 1 for: IBM randu.
static long maple(long v)
          LCG pseudo-random generator from Maple.
static long mapleMax()
          max + 1 for Maple.
static long numericRecipes(long v)
          LCG pseudo-random generator from "Numeric Recipes in C".
static long numericRecipesMax()
          max + 1 for: "Numeric Recipes in C".
static long parkMiller(long v)
          LCG pseudo-random generator: minimal standard LCG.
static long parkMillerMax()
          max + 1 for minimal standard LCG.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BITS_32

protected static final long BITS_32
See Also:
Constant Field Values

BITS_31

protected static final long BITS_31
See Also:
Constant Field Values
Constructor Detail

RandomStatic

public RandomStatic()
Method Detail

numericRecipes

public static final long numericRecipes(long v)
LCG pseudo-random generator from "Numeric Recipes in C".

Parameters:
v - Random seed.
Returns:
The next pseudo-random number in the sequence.
See Also:
numericRecipesMax()

numericRecipesMax

public static final long numericRecipesMax()
max + 1 for: "Numeric Recipes in C".


ibmRandu

public static final long ibmRandu(long v)
LCG pseudo-random generator: IBM randu. Bad distribution in 3D space!

Parameters:
v - Random seed.
Returns:
The next pseudo-random number in the sequence.
See Also:
ibmRanduMax()

ibmRanduMax

public static final long ibmRanduMax()
max + 1 for: IBM randu.


parkMiller

public static final long parkMiller(long v)
LCG pseudo-random generator: minimal standard LCG. Proposed in Stephen K. Park and Keith W. Miller: Random Number Generators: Good Ones Are Hard To Find, Communications of the ACM, 31(10):1192-1201, 1988.

Parameters:
v - Random seed.
Returns:
The next pseudo-random number in the sequence.
See Also:
parkMillerMax()

parkMillerMax

public static final long parkMillerMax()
max + 1 for minimal standard LCG.


maple

public static final long maple(long v)
LCG pseudo-random generator from Maple.

Parameters:
v - Random seed.
Returns:
The next pseudo-random number in the sequence.
See Also:
mapleMax()

mapleMax

public static final long mapleMax()
max + 1 for Maple.