Package jasima.core.random.continuous
Class DblNormal
- java.lang.Object
-
- jasima.core.random.continuous.DblSequence
-
- jasima.core.random.continuous.DblNormal
-
- All Implemented Interfaces:
Serializable,Cloneable
public class DblNormal extends DblSequence
Creates a number stream with values following a Normal distribution.- Author:
- Torsten Hildebrandt
- See Also:
- Normal distribution (Wikipedia), Normal 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 doublegetMean()doublegetNumericalMean()Returns the arithmetic mean of the values returned byDblSequence.nextDbl().doublegetStdev()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.voidsetMean(double mean)Sets the mean value of this normally distributed number stream.voidsetStdev(double stdev)Sets the standard deviation of this normally distributed number stream.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.
-
getMean
public double getMean()
-
setMean
public void setMean(double mean)
Sets the mean value of this normally distributed number stream. Default value is0.0.- Parameters:
mean- The mean value.
-
getStdev
public double getStdev()
-
setStdev
public void setStdev(double stdev) throws org.apache.commons.math3.exception.NotPositiveExceptionSets the standard deviation of this normally distributed number stream. This defaults to1.0.- Parameters:
stdev- The standard deviation.- Throws:
org.apache.commons.math3.exception.NotPositiveException- Raised if stdev was negative.
-
-