Random0

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

The Random0 class generates random real numbers in the range (0, 1). It implements, using 32-bit integers (Int's).

x_i = (x_i-1 + 1) % m

Value parameters

stream

the random number stream index

Attributes

See also

Random for a better random number generator

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 = (x_i-1 + 1) % m using x = (x + 1) % m

Return the next random number as a Double in the interval (0, 1). Compute x_i = (x_i-1 + 1) % m using x = (x + 1) % 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 = (x_i-1 + 1) % m using x = (x + 1) % m

Return the next stream value as a Int in the set {1, 2, ... , m-1}. Compute x_i = (x_i-1 + 1) % m using x = (x + 1) % 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