javanpst.distributions.common.continuous
Class LogisticDistribution
- java.lang.Object
-
- javanpst.distributions.common.continuous.LogisticDistribution
-
- All Implemented Interfaces:
- Distribution
public class LogisticDistribution extends java.lang.Object implements Distribution
A Logistic distribution.
-
-
Constructor Summary
Constructors Constructor and Description LogisticDistribution()Default builder.LogisticDistribution(double mean, double s)Builder.LogisticDistribution(LogisticDistribution old)Copy constructor Creates a copy of a given Logistic 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 Logistic distribution.doublecomputeProbability(double x)Computes mass probability at a given point of the Logistic distribution.doublegetMean()Gets the mean parameterdoublegetS()Gets the s parametervoidsetMean(double value)Sets meanvoidsetS(double value)Sets S S value must be positivejava.lang.StringtoString()To String method.
-
-
-
Constructor Detail
-
LogisticDistribution
public LogisticDistribution()
Default builder. Creates a Logistic distribution with parameters mean = 0 and s = 1
-
LogisticDistribution
public LogisticDistribution(double mean, double s)Builder. Creates a Logistic distribution with the specified parameters S must be positive- Parameters:
mean- mean of the distributions- scale of the distribution
-
LogisticDistribution
public LogisticDistribution(LogisticDistribution old)
Copy constructor Creates a copy of a given Logistic distribution- Parameters:
old- Logistic distribution to copy
-
-
Method Detail
-
setMean
public void setMean(double value)
Sets mean- Parameters:
value- mean value
-
setS
public void setS(double value)
Sets S S value must be positive- Parameters:
value- S value
-
getMean
public double getMean()
Gets the mean parameter- Returns:
- value of mean
-
getS
public double getS()
Gets the s parameter- Returns:
- value of s
-
computeProbability
public double computeProbability(double x)
Computes mass probability at a given point of the Logistic 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 Logistic 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