The rv class provides a random variable based on a selectable implementation.
Public Methods
-
rv(unsigned long seed = 1)
- Create a random variable with the default implementation
-
rv(random_seq* rand)
- Create a random variable with the desired implementation.
-
rv(const rv& src)
- Copy constructor relies on copy method of underlying stream
-
const rv& operator=(const rv& src)
- Assignment operator relies on copy method of underlying stream
-
void set_seed(unsigned long seed)
- See the random number generator implementation
-
unsigned long next_long()
- Get a raw value from the underlying random number generator
-
double triangular(double a, double b, double c)
- Sample a triangular distribution with (a, b, c)
-
double uniform(double a, double b)
- Sample a uniform distribution in the range [a, b]
-
double normal(double m, double s)
- Sample a normally distributed random variable with mean m and standard deviation s
-
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)
-
double exponential(double a)
-
double hyperexponential(double p, double a, double b)
-
double laplace(double a)
-
double chisquare(unsigned int n)
-
double student(unsigned int n)
-
double lognormal(double a, double b)
-
double erlang(unsigned int n, double a)
-
double gamma(double a, double b)
-
double beta(double a, double b)
-
double fdistribution(unsigned int n, unsigned int m)
-
double poisson(double a)
-
double geometric(double p)
-
double hypergeometric(unsigned int m, unsigned int n, double p)
-
double weibull(double a, double b)
-
double binomial(double p, unsigned int n)
-
double negativebinomial(double p, unsigned int n)
-
double triangular(double a)
-
int probability(double p)
-
double lngamma(double xx)
-
~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).
rv(unsigned long seed = 1)
- Create a random variable with the default implementation
rv(random_seq* rand)
-
Create a random variable with the desired implementation. The
implementation class is adopted by the rv.
rv(const rv& src)
- Copy constructor relies on copy method of underlying stream
const rv& operator=(const rv& src)
- Assignment operator relies on copy method of underlying stream
void set_seed(unsigned long seed)
- See the random number generator implementation
unsigned long next_long()
- Get a raw value from the underlying random number generator
double triangular(double a, double b, double c)
- Sample a triangular distribution with (a, b, c)
double uniform(double a, double b)
- Sample a uniform distribution in the range [a, b]
double normal(double m, double s)
-
Sample a normally distributed random variable with mean m and
standard deviation s
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)
double exponential(double a)
double hyperexponential(double p, double a, double b)
double laplace(double a)
double chisquare(unsigned int n)
double student(unsigned int n)
double lognormal(double a, double b)
double erlang(unsigned int n, double a)
double gamma(double a, double b)
double beta(double a, double b)
double fdistribution(unsigned int n, unsigned int m)
double poisson(double a)
double geometric(double p)
double hypergeometric(unsigned int m, unsigned int n, double p)
double weibull(double a, double b)
double binomial(double p, unsigned int n)
double negativebinomial(double p, unsigned int n)
double triangular(double a)
int probability(double p)
double lngamma(double xx)
~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++.