javanpst.distributions.common.continuous
Class WeibullDistribution
- java.lang.Object
-
- javanpst.distributions.common.continuous.WeibullDistribution
-
- All Implemented Interfaces:
- Distribution
public class WeibullDistribution extends java.lang.Object implements Distribution
A Weibull distribution.
-
-
Constructor Summary
Constructors Constructor and Description WeibullDistribution()Default builder.WeibullDistribution(double lambda, double k)Builder.WeibullDistribution(WeibullDistribution old)Copy constructor Creates a copy of a given Laplace distribution
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecomputeCumulativeProbability(double x)Computes cumulative probability at a given point of the Weibull distribution.doublecomputeProbability(double x)Computes mass probability at a given point of the Weibull distribution.doublegetK()Gets the k parameterdoublegetLambda()Gets the lambda parametervoidsetK(double value)Sets k K value must be positivevoidsetLambda(double value)Sets lambda Lambda value must be positivejava.lang.StringtoString()To String method.
-
-
-
Constructor Detail
-
WeibullDistribution
public WeibullDistribution()
Default builder. Creates a Weibull distribution with parameters lambda = 1 and k = 1
-
WeibullDistribution
public WeibullDistribution(double lambda, double k)Builder. Creates a Weibull distribution with specified lambda and k parameters Lambda and k must be positive- Parameters:
lambda- lambda parameter of the distributionk- k parameter of the distribution
-
WeibullDistribution
public WeibullDistribution(WeibullDistribution old)
Copy constructor Creates a copy of a given Laplace distribution- Parameters:
old- Laplace distribution to copy
-
-
Method Detail
-
setLambda
public void setLambda(double value)
Sets lambda Lambda value must be positive- Parameters:
value- lambda value
-
setK
public void setK(double value)
Sets k K value must be positive- Parameters:
value- k value
-
getLambda
public double getLambda()
Gets the lambda parameter- Returns:
- value of lambda
-
getK
public double getK()
Gets the k parameter- Returns:
- value of k
-
computeProbability
public double computeProbability(double x)
Computes mass probability at a given point of the Weibull distribution.- Specified by:
computeProbabilityin interfaceDistribution- Parameters:
x- point selected- Returns:
- mass probability at 'x'
-
computeCumulativeProbability
public double computeCumulativeProbability(double x)
Computes cumulative probability at a given point of the Weibull distribution.- Specified by:
computeCumulativeProbabilityin interfaceDistribution- Parameters:
x- point selected- Returns:
- cumulative probability at 'x'
-
toString
public java.lang.String toString()
To String method.- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation of the distribution
-
-
DMelt 3.0 © DataMelt by jWork.ORG