Random3

scalation.random.Random3
case class Random3(stream: Int) extends RNG

The Random3 class generates random real numbers in the range (0, 1). It implements, using 64-bit integers (Int's), the 'MINSTD' generator, which is a multiplicative Linear Congruential Generator (LCG). These generators were commonly used in the last century.

x_i = a x_i-1 % m

Value parameters

stream

the random number stream index

Attributes

See also

http://random.mat.sbg.ac.at/results/karl/server/node4.html#SECTION00042000000000000000 In case a better generator is needed, a Multiple Recursive Generator (MRG) or Composite Multiple Recursive Generator (CMRG) should be used.

Random

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait RNG
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

inline def gen: Double

Return the next random number as a Double in the interval (0, 1). Compute x_i = a x_i-1 % m using x = a * x % m

Return the next random number as a Double in the interval (0, 1). Compute x_i = a x_i-1 % m using x = a * x % m

Attributes

def getM: Double

Return the modulus used by this random number generator.

Return the modulus used by this random number generator.

Attributes

inline def igen: Int

Return the next stream value as a Int in the set {1, 2, ... , m-1}. Compute x_i = a x_i-1 % m using x = a * x % m

Return the next stream value as a Int in the set {1, 2, ... , m-1}. Compute x_i = a x_i-1 % m using x = a * x % m

Attributes

Inherited methods

def pf(z: Double): Double

Compute the probability function (pf), i.e., the probability density function (pdf).

Compute the probability function (pf), i.e., the probability density function (pdf).

Value parameters

z

the mass point whose probability density is sought

Attributes

Inherited from:
RNG
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Inherited fields

val mean: Double

Return the theoretical mean for the random number generator's 'gen' method.

Return the theoretical mean for the random number generator's 'gen' method.

Attributes

Inherited from:
RNG