Variate

scalation.random.Variate
abstract class Variate(stream: Int)

The Variate abstract class serves as a base class for all the Random Variate (RV) generators. They use one of the Random Number Generators (RNG's) from Random to generate numbers following their particular distribution. Random Variate Generators (RVG's) for thirty popular probability distributions are implemented as extensions of Variate. Still need to add one.

Value parameters

stream

the random number stream (0 until N_STREAMS)

Attributes

See also
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Bernoulli
class Beta
class Binomial
class Cauchy
class ChiSquare
class Dice
class Discrete
class Erlang
class Exponential
class Fisher
class Gamma
class Geometric
class Known
class LogNormal
class Logistic
class Normal
class Poisson
class PowerLaw
class Randi
class Randi0
class RandiU0
class RandomStr
class RandomWord
class Sharp
class StdNormal
class StudentT
class TimeVariate
class Trapezoidal
class Triangular
class Trinomial
class Uniform
class Weibull
Show all

Members list

Value members

Abstract methods

def gen: Double

Determine the next random number for the particular distribution.

Determine the next random number for the particular distribution.

Attributes

def gen1(z: Double): Double

Determine the next random number for the particular distribution. This version allows one parameter.

Determine the next random number for the particular distribution. This version allows one parameter.

Value parameters

z

the limit parameter

Attributes

def pf(z: Double): Double

Compute the probability function (pf): Either (a) the probability density function (pdf) for continuous RV's or (b) the probability mass function (pmf) for discrete RV's.

Compute the probability function (pf): Either (a) the probability density function (pdf) for continuous RV's or (b) the probability mass function (pmf) for discrete RV's.

Value parameters

z

the mass point whose probability density/mass is sought

Attributes

Concrete methods

def discrete: Boolean

Determine whether the distribution is discrete or continuous.

Determine whether the distribution is discrete or continuous.

Attributes

def igen: Int

Determine the next random integer for the particular distribution. It is only valid for discrete random variates.

Determine the next random integer for the particular distribution. It is only valid for discrete random variates.

Attributes

def igen1(z: Double): Int

Determine the next random integer for the particular distribution. It is only valid for discrete random variates. This version allows one parameter.

Determine the next random integer for the particular distribution. It is only valid for discrete random variates. This version allows one parameter.

Value parameters

z

the limit parameter

Attributes

def pmf(k: Int): Array[Double]

Return the entire probability mass function (pmf) for finite discrete RV's.

Return the entire probability mass function (pmf) for finite discrete RV's.

Value parameters

k

number of objects of the first type

Attributes

def sgen: String

Determine the next random string for the particular distribution. For better random strings, overide this method.

Determine the next random string for the particular distribution. For better random strings, overide this method.

Attributes

def sgen1(z: Double): String

Determine the next random string for the particular distribution. For better random strings, overide this method. This version allows one parameter.

Determine the next random string for the particular distribution. For better random strings, overide this method. This version allows one parameter.

Value parameters

z

the limit parameter

Attributes

Abstract fields

val mean: Double

Precompute the mean for the particular distribution.

Precompute the mean for the particular distribution.

Attributes