Package jasima.core.random.continuous
Class DblErlang
- java.lang.Object
-
- jasima.core.random.continuous.DblSequence
-
- jasima.core.random.continuous.DblErlang
-
- All Implemented Interfaces:
Serializable,Cloneable
public class DblErlang extends DblSequence
Implementation of the Erlang distribution. It is the distribution of a sum ofshapeindependent exponential variables each with meanscale.The Erlang distribution is a special case of the Gamma distribution (with the shape parameter being restricted to an integer. For shape=1 it is the same as the Exponential distribution.
- Author:
- Torsten Hildebrandt
- See Also:
- Erlang distribution (Wikipedia), Erlang Distribution (MathWorld), Serialized Form
-
-
Field Summary
-
Fields inherited from class jasima.core.random.continuous.DblSequence
rndGen
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetNumericalMean()Returns the arithmetic mean of the values returned byDblSequence.nextDbl().doublegetScale()intgetShape()Pair<Double,Double>getValueRange()This method computes the minimum and maximum support values (range of possible values) of this stream.doublenextDbl()Returns the next number in this number stream.voidsetScale(double scale)Sets the scale parameter of this distribution.voidsetShape(int shape)Sets the shape parameter of this distribution.StringtoString()-
Methods inherited from class jasima.core.random.continuous.DblSequence
clone, createStreamDefFromStream, getName, getRndGen, init, max, min, setName, setRndGen
-
-
-
-
Method Detail
-
nextDbl
public double nextDbl()
Description copied from class:DblSequenceReturns the next number in this number stream.- Specified by:
nextDblin classDblSequence
-
getNumericalMean
public double getNumericalMean()
Description copied from class:DblSequenceReturns the arithmetic mean of the values returned byDblSequence.nextDbl().- Overrides:
getNumericalMeanin classDblSequence
-
getValueRange
public Pair<Double,Double> getValueRange()
Description copied from class:DblSequenceThis method computes the minimum and maximum support values (range of possible values) of this stream.- Overrides:
getValueRangein classDblSequence- Returns:
- A
Paircontaining the minimum and maximum support values.
-
getShape
public int getShape()
-
setShape
public void setShape(int shape)
Sets the shape parameter of this distribution.
-
getScale
public double getScale()
-
setScale
public void setScale(double scale)
Sets the scale parameter of this distribution.
-
-