uniform_distribution Class Reference

#include <uniform.h>

Inheritance diagram for uniform_distribution:

continuous_distribution

List of all members.

Public Member Functions

 uniform_distribution (double a=0.0, double b=1.0)
double cdf (double x) const
double inverse_cdf (double p) const
double lower () const
void lower (double a)
double upper () const
void upper (double b)


Detailed Description

The uniform distribution.

References:

  1. Eric W. Weisstein. "Uniform Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/UniformDistribution.html

Constructor & Destructor Documentation

NUM_NAMESPACE_BEGIN uniform_distribution::uniform_distribution ( double  a = 0.0,
double  b = 1.0 
)

Create a distribution with the given lower bound and upper bound values.

Parameters:
a the lower bound parameter.
b the upper bound parameter.
Create a distribution with the given lower and upper values.
Parameters:
a the lower parameter.
b the upper parameter.


Member Function Documentation

double uniform_distribution::cdf ( double  x  )  const [virtual]

The CDF for this distribution. This method returns P(X < x).

Parameters:
x the value at which the CDF is evaluated.
Returns:
CDF for this distribution.

Implements continuous_distribution.

double uniform_distribution::inverse_cdf ( double  p  )  const [virtual]

The inverse CDF for this distribution. This method returns x such that, P(X < x) = p.

Parameters:
p the cumulative probability.
Returns:
x

Implements continuous_distribution.

double uniform_distribution::lower (  )  const

Access the lower bound parameter.

Returns:
the lower bound parameter.

void uniform_distribution::lower ( double  a  ) 

Modify the lower bound parameter.

Parameters:
a the new lower bound value.

double uniform_distribution::upper (  )  const

Access the upper bound parameter.

Returns:
the upper bound parameter.

void uniform_distribution::upper ( double  b  ) 

Modify the upper bound parameter.

Parameters:
b the new upper bound value.


The documentation for this class was generated from the following files:
Generated on Wed Nov 21 22:22:16 2007 for numerics4c++ by  doxygen 1.5.3