class rv

The rv class provides a random variable based on a selectable implementation.

Public Methods

[more] rv(unsigned long seed = 1)
Create a random variable with the default implementation
[more] rv(random_seq* rand)
Create a random variable with the desired implementation.
[more] rv(const rv& src)
Copy constructor relies on copy method of underlying stream
[more]const rv& operator=(const rv& src)
Assignment operator relies on copy method of underlying stream
[more]void set_seed(unsigned long seed)
See the random number generator implementation
[more]unsigned long next_long()
Get a raw value from the underlying random number generator
[more]double triangular(double a, double b, double c)
Sample a triangular distribution with (a, b, c)
[more]double uniform(double a, double b)
Sample a uniform distribution in the range [a, b]
[more]double normal(double m, double s)
Sample a normally distributed random variable with mean m and standard deviation s
[more]double exp(double a)
An assortment of other random variable types contributed by Alex Cave(whos is with the Intelligent Systems Automation Group in the School of Engineering at Deakin University)
[more]double exponential(double a)
[more]double hyperexponential(double p, double a, double b)
[more]double laplace(double a)
[more]double chisquare(unsigned int n)
[more]double student(unsigned int n)
[more]double lognormal(double a, double b)
[more]double erlang(unsigned int n, double a)
[more]double gamma(double a, double b)
[more]double beta(double a, double b)
[more]double fdistribution(unsigned int n, unsigned int m)
[more]double poisson(double a)
[more]double geometric(double p)
[more]double hypergeometric(unsigned int m, unsigned int n, double p)
[more]double weibull(double a, double b)
[more]double binomial(double p, unsigned int n)
[more]double negativebinomial(double p, unsigned int n)
[more]double triangular(double a)
[more]int probability(double p)
[more]double lngamma(double xx)
[more] ~rv()
Destructor


Documentation

The rv class provides a random variable based on a selectable implementation. By default, this implementation is the Mersenne Twister (see mtrand).
o rv(unsigned long seed = 1)
Create a random variable with the default implementation

o rv(random_seq* rand)
Create a random variable with the desired implementation. The implementation class is adopted by the rv.

o rv(const rv& src)
Copy constructor relies on copy method of underlying stream

oconst rv& operator=(const rv& src)
Assignment operator relies on copy method of underlying stream

ovoid set_seed(unsigned long seed)
See the random number generator implementation

ounsigned long next_long()
Get a raw value from the underlying random number generator

odouble triangular(double a, double b, double c)
Sample a triangular distribution with (a, b, c)

odouble uniform(double a, double b)
Sample a uniform distribution in the range [a, b]

odouble normal(double m, double s)
Sample a normally distributed random variable with mean m and standard deviation s

odouble exp(double a)
An assortment of other random variable types contributed by Alex Cave(whos is with the Intelligent Systems Automation Group in the School of Engineering at Deakin University)

odouble exponential(double a)

odouble hyperexponential(double p, double a, double b)

odouble laplace(double a)

odouble chisquare(unsigned int n)

odouble student(unsigned int n)

odouble lognormal(double a, double b)

odouble erlang(unsigned int n, double a)

odouble gamma(double a, double b)

odouble beta(double a, double b)

odouble fdistribution(unsigned int n, unsigned int m)

odouble poisson(double a)

odouble geometric(double p)

odouble hypergeometric(unsigned int m, unsigned int n, double p)

odouble weibull(double a, double b)

odouble binomial(double p, unsigned int n)

odouble negativebinomial(double p, unsigned int n)

odouble triangular(double a)

oint probability(double p)

odouble lngamma(double xx)

o ~rv()
Destructor


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.