scalation.random

Random3

case class Random3(stream: Int = 0) extends RNG with Product with Serializable

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

stream

the random number stream index

See also

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.1024

Random

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.

Linear Supertypes
Serializable, Serializable, Product, Equals, RNG, Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Random3
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. RNG
  7. Error
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Random3(stream: Int = 0)

    stream

    the random number stream index

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  11. def gen: Double

    Return the next random number as a Double in the interval (0, 1).

    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

    Definition Classes
    Random3RNG
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def getM: Double

    Return the modulus used by this random number generator.

  14. def igen: Int

    Return the next stream value as a Int in the set {1, 2, .

    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

    Definition Classes
    Random3RNG
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. 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.

    Definition Classes
    RNG
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def pf(z: Double): Double

    Compute the probability function (pf), i.

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

    z

    the mass point whose probability density is sought

    Definition Classes
    RNG
  21. val stream: Int

    the random number stream index

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from RNG

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped