Package jasima.core.random.continuous
Class DblSumStream
- java.lang.Object
-
- jasima.core.random.continuous.DblSequence
-
- jasima.core.random.continuous.DblSumStream
-
- All Implemented Interfaces:
Serializable,Cloneable
public class DblSumStream extends DblSequence
Creates a number stream that is the sum of a given set of base streams.- Author:
- Torsten Hildebrandt
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class jasima.core.random.continuous.DblSequence
rndGen
-
-
Constructor Summary
Constructors Constructor Description DblSumStream()DblSumStream(DblSequence... subStreams)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetNumericalMean()Returns the arithmetic mean of the values returned byDblSequence.nextDbl().DblSequence[]getSubStreams()Pair<Double,Double>getValueRange()This method computes the minimum and maximum support values (range of possible values) of this stream.voidinit()Initializes this stream.doublenextDbl()Returns the next number in this number stream.voidsetSubStreams(DblSequence... subStreams)Sets the sub-streams to compute the values of this number stream.StringtoString()-
Methods inherited from class jasima.core.random.continuous.DblSequence
clone, createStreamDefFromStream, getName, getRndGen, max, min, setName, setRndGen
-
-
-
-
Constructor Detail
-
DblSumStream
public DblSumStream()
-
DblSumStream
public DblSumStream(DblSequence... subStreams)
-
-
Method Detail
-
init
public void init()
Description copied from class:DblSequenceInitializes this stream. This method is supposed to be called once before repeated calls toDblSequence.nextDbl()can be made.- Overrides:
initin classDblSequence
-
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.
-
getSubStreams
public DblSequence[] getSubStreams()
-
setSubStreams
public void setSubStreams(DblSequence... subStreams)
Sets the sub-streams to compute the values of this number stream.- Parameters:
subStreams- The sub-streams to use.
-
-