jhplot.math.num.pdf
Class Laplace
- java.lang.Object
- 
- jhplot.math.num.pdf.ContinuousDistribution
- 
- jhplot.math.num.pdf.Laplace
 
 
- 
- All Implemented Interfaces:
- Distribution
 
 
 public class Laplace extends ContinuousDistribution The Laplace distribution. References: - Eric W. Weisstein. "Laplace Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Laplace.html
 - Since:
- 1.2
 
- 
- 
Constructor SummaryConstructors Constructor and Description Laplace()Default constructor.Laplace(double m, double s)Create a distribution with the given mean and scale.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecumulativeProbability(double x)The CDF for this distribution.doublegetMean()Access the mean.doublegetScale()Access the scale.doubleinverseCumulativeProbability(double p)The inverse CDF for this distribution.voidsetMean(double m)Modify the mean.voidsetScale(double s)Modify the scale.
 
- 
- 
- 
Constructor Detail- 
Laplacepublic Laplace() Default constructor. Mean is set to zero and scale is set to one.
 - 
Laplacepublic Laplace(double m, double s)Create a distribution with the given mean and scale.- Parameters:
- m- the mean.
- s- the scale.
 
 
- 
 - 
Method Detail- 
cumulativeProbabilitypublic double cumulativeProbability(double x) The CDF for this distribution. This method returns P(X < x).- Specified by:
- cumulativeProbabilityin class- ContinuousDistribution
- Parameters:
- x- the value at which the CDF is evaluated.
- Returns:
- CDF for this distribution.
 
 - 
getMeanpublic double getMean() Access the mean.- Returns:
- the mean.
 
 - 
getScalepublic double getScale() Access the scale.- Returns:
- the scale.
 
 - 
inverseCumulativeProbabilitypublic double inverseCumulativeProbability(double p) The inverse CDF for this distribution. This method returns x such that, P(X < x) = p.- Specified by:
- inverseCumulativeProbabilityin class- ContinuousDistribution
- Parameters:
- p- the cumulative probability.
- Returns:
- x
 
 - 
setMeanpublic void setMean(double m) Modify the mean.- Parameters:
- m- the new mean value.
 
 - 
setScalepublic void setScale(double s) Modify the scale.- Parameters:
- s- the new scale value.
 
 
- 
 
- 
DMelt 3.0 © DataMelt by jWork.ORG