Package jasima.core.random.continuous
Class DblChiSquared
- java.lang.Object
-
- jasima.core.random.continuous.DblSequence
-
- jasima.core.random.continuous.DblDistribution
-
- jasima.core.random.continuous.DblChiSquared
-
- All Implemented Interfaces:
Serializable,Cloneable
public class DblChiSquared extends DblDistribution
Implements a stream of numbers following a Chi-squared distribution. The distribution has a single shape (integer) parameter:degreesOfFreedom. This distribution is a special case of aGamma distribution.- Author:
- Torsten Hildebrandt
- See Also:
- Chi- squared distribution (Wikipedia), Chi- squared distribution (MathWorld), Serialized Form
-
-
Field Summary
-
Fields inherited from class jasima.core.random.continuous.DblSequence
rndGen
-
-
Constructor Summary
Constructors Constructor Description DblChiSquared()DblChiSquared(int degreesOfFreedom)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDegreesOfFreedom()voidsetDegreesOfFreedom(int degreesOfFreedom)Sets the degrees of freedom for this distribution.protected voidsetDistribution(org.apache.commons.math3.distribution.RealDistribution distribution)Sets the continuous distribution to use.StringtoString()-
Methods inherited from class jasima.core.random.continuous.DblDistribution
getDistribution, getNumericalMean, getValueRange, nextDbl
-
Methods inherited from class jasima.core.random.continuous.DblSequence
clone, createStreamDefFromStream, getName, getRndGen, init, max, min, setName, setRndGen
-
-
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toStringin classDblDistribution
-
setDistribution
protected void setDistribution(org.apache.commons.math3.distribution.RealDistribution distribution)
Description copied from class:DblDistributionSets the continuous distribution to use.- Overrides:
setDistributionin classDblDistribution
-
getDegreesOfFreedom
public int getDegreesOfFreedom()
-
setDegreesOfFreedom
public void setDegreesOfFreedom(int degreesOfFreedom) throws org.apache.commons.math3.exception.NotStrictlyPositiveExceptionSets the degrees of freedom for this distribution.- Parameters:
degreesOfFreedom- The degrees of freedom to use.- Throws:
org.apache.commons.math3.exception.NotStrictlyPositiveException- If the parameter value was<=0.0.
-
-