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://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
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.1024
- Alphabetic
- By Inheritance
- Random3
- Serializable
- Serializable
- Product
- Equals
- RNG
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Random3(stream: Int = 0)
- stream
the random number stream index
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
flaw(method: String, message: String): Unit
- Definition Classes
- Error
-
def
gen: Double
Return the next random number as a
Double
in the interval (0, 1). -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getM: Double
Return the modulus used by this random number generator.
-
def
igen: Int
Return the next stream value as a
Int
in the set {1, 2, ... -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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).
- z
the mass point whose probability density is sought
- Definition Classes
- RNG
- val stream: Int
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated