net.sf.doodleproject.numerics4j.statistics.distribution
Class UniformDistribution

java.lang.Object
  extended by net.sf.doodleproject.numerics4j.statistics.distribution.ContinuousDistribution
      extended by net.sf.doodleproject.numerics4j.statistics.distribution.UniformDistribution
All Implemented Interfaces:
Distribution

public class UniformDistribution
extends ContinuousDistribution

The Uniform distribution (1).

References:

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

Since:
1.1
Version:
$Revision: 1.3 $ $Date: 2007/11/18 23:51:21 $

Constructor Summary
UniformDistribution()
          Default constructor.
UniformDistribution(double a, double b)
          Create a distribution with the given lower bound and upper bound values.
 
Method Summary
 double cumulativeProbability(double x)
          The CDF for this distribution.
 double getLower()
          Access the lower parameter.
 double getUpper()
          Access the upper parameter.
 double inverseCumulativeProbability(double p)
          The inverse CDF for this distribution.
 void setLower(double low)
          Modify the lower bound parameter.
 void setUpper(double up)
          Modify the upper bound parameter.
 
Methods inherited from class net.sf.doodleproject.numerics4j.statistics.distribution.ContinuousDistribution
findInverseCumulativeProbability
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniformDistribution

public UniformDistribution()
Default constructor. The lower bound is set to 0 and the upper bound is set to 1.


UniformDistribution

public UniformDistribution(double a,
                           double b)
Create a distribution with the given lower bound and upper bound values.

Parameters:
a - the lower bound parameter.
b - the upper bound parameter.
Method Detail

cumulativeProbability

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

Specified by:
cumulativeProbability in class ContinuousDistribution
Parameters:
x - the value at which the CDF is evaluated.
Returns:
CDF for this distribution.

getLower

public double getLower()
Access the lower parameter.

Returns:
the lower parameter.

getUpper

public double getUpper()
Access the upper parameter.

Returns:
the upper parameter.

inverseCumulativeProbability

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

Specified by:
inverseCumulativeProbability in class ContinuousDistribution
Parameters:
p - the cumulative probability.
Returns:
x

setLower

public void setLower(double low)
Modify the lower bound parameter.

Parameters:
low - the new lower bound value.

setUpper

public void setUpper(double up)
Modify the upper bound parameter.

Parameters:
up - the new upper bound value.


Copyright 2004-2004-2007 DoodleProject. All Rights Reserved.