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

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

public class LaplaceDistribution
extends ContinuousDistribution

The Laplace distribution.

References:

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

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

Constructor Summary
LaplaceDistribution()
          Default constructor.
LaplaceDistribution(double m, double s)
          Create a distribution with the given mean and scale.
 
Method Summary
 double cumulativeProbability(double x)
          The CDF for this distribution.
 double getMean()
          Access the mean.
 double getScale()
          Access the scale.
 double inverseCumulativeProbability(double p)
          The inverse CDF for this distribution.
 void setMean(double m)
          Modify the mean.
 void setScale(double s)
          Modify the scale.
 
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

LaplaceDistribution

public LaplaceDistribution()
Default constructor. Mean is set to zero and scale is set to one.


LaplaceDistribution

public LaplaceDistribution(double m,
                           double s)
Create a distribution with the given mean and scale.

Parameters:
m - the mean.
s - the scale.
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.

getMean

public double getMean()
Access the mean.

Returns:
the mean.

getScale

public double getScale()
Access the scale.

Returns:
the scale.

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

setMean

public void setMean(double m)
Modify the mean.

Parameters:
m - the new mean value.

setScale

public void setScale(double s)
Modify the scale.

Parameters:
s - the new scale value.


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