Package jasima.core.random.continuous
Class DblDistribution
- java.lang.Object
-
- jasima.core.random.continuous.DblSequence
-
- jasima.core.random.continuous.DblDistribution
-
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
DblBeta,DblChiSquared,DblExp,DblGamma,DblLogNormal,DblTDist,DblWeibull
public class DblDistribution extends DblSequence
Returns an arbitrarily distributed random number stream. Its distribution is determined by an arbitraryRealDistributionobject from the Apache Commons Math library. This class is usually not used directly but through its various sub-classes implementing particular distributions and exposing their parameters as Java Bean properties.- Author:
- Torsten Hildebrandt
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class jasima.core.random.continuous.DblSequence
rndGen
-
-
Constructor Summary
Constructors Constructor Description DblDistribution()DblDistribution(String name, org.apache.commons.math3.distribution.RealDistribution distribution)DblDistribution(Random random, String name, org.apache.commons.math3.distribution.RealDistribution distribution)DblDistribution(Random random, org.apache.commons.math3.distribution.RealDistribution distribution)DblDistribution(org.apache.commons.math3.distribution.RealDistribution distribution)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.math3.distribution.RealDistributiongetDistribution()doublegetNumericalMean()Returns the arithmetic mean of the values returned byDblSequence.nextDbl().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.protected voidsetDistribution(org.apache.commons.math3.distribution.RealDistribution distribution)Sets the continuous distribution to use.StringtoString()-
Methods inherited from class jasima.core.random.continuous.DblSequence
clone, createStreamDefFromStream, getName, getRndGen, init, max, min, setName, setRndGen
-
-
-
-
Constructor Detail
-
DblDistribution
public DblDistribution()
-
DblDistribution
public DblDistribution(org.apache.commons.math3.distribution.RealDistribution distribution)
-
DblDistribution
public DblDistribution(Random random, org.apache.commons.math3.distribution.RealDistribution distribution)
-
DblDistribution
public DblDistribution(String name, org.apache.commons.math3.distribution.RealDistribution distribution)
-
-
Method Detail
-
getDistribution
public org.apache.commons.math3.distribution.RealDistribution getDistribution()
-
setDistribution
protected void setDistribution(org.apache.commons.math3.distribution.RealDistribution distribution)
Sets the continuous distribution to use.
-
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.
-
-