RandomWord

scalation.random.RandomWord
case class RandomWord(nWords: Int, lRange: Range, cRange: Range, stream: Int) extends Variate

The RandomWord class generates random words from a predetermined set.

Value parameters

cRange

the range of characters to generate

lRange

the range of string lengths to generate

nWords

the numbers of words to predetermine.

stream

the random number stream

Attributes

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

Members list

Value members

Concrete 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(s: 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

override def sgen: String

Generate a random string.

Generate a random string.

Attributes

Definition Classes

Inherited methods

def discrete: Boolean

Determine whether the distribution is discrete or continuous.

Determine whether the distribution is discrete or continuous.

Attributes

Inherited from:
Variate
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

Inherited from:
Variate
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

Inherited from:
Variate
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

Inherited from:
Variate
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
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

Inherited from:
Variate

Concrete fields

val mean: Double

Precompute the mean for the particular distribution.

Precompute the mean for the particular distribution.

Attributes