Package microsim.statistics.functions
Class SumArrayFunction
java.lang.Object
microsim.statistics.functions.AbstractFunction
microsim.statistics.functions.AbstractArrayFunction
microsim.statistics.functions.SumArrayFunction
- All Implemented Interfaces:
EventListener,DoubleSource,UpdatableSource
- Direct Known Subclasses:
SumArrayFunction.Double,SumArrayFunction.Integer,SumArrayFunction.Long
This class computes the sum of an array of source values. According to the source data type there are three data-type
oriented implementations. Each of them implements always the
DoubleSource interface.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSumFunction operating on double source values.static classSumFunction operating on integer source values.static classSumFunction operating on long source values.Nested classes/interfaces inherited from interface microsim.statistics.DoubleSource
DoubleSource.Variables -
Field Summary
Fields inherited from class microsim.statistics.functions.AbstractArrayFunction
dblSource, intSource, lngSource, type, TYPE_DBL, TYPE_INT, TYPE_LNGFields inherited from class microsim.statistics.functions.AbstractFunction
timeChecker -
Constructor Summary
ConstructorsConstructorDescriptionSumArrayFunction(@NonNull DoubleArraySource source) Create a sum function on a double array source.SumArrayFunction(@NonNull IntArraySource source) Creates a sum function on an integer array source.SumArrayFunction(@NonNull LongArraySource source) Creates a sum function on a long array source. -
Method Summary
Methods inherited from class microsim.statistics.functions.AbstractArrayFunction
apply, apply, apply, applyFunctionMethods inherited from class microsim.statistics.functions.AbstractFunction
isCheckingTime, onEvent, setCheckingTime, updateSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface microsim.statistics.DoubleSource
getDoubleValue
-
Constructor Details
-
SumArrayFunction
Creates a sum function on an integer array source.- Parameters:
source- The data source.- Throws:
NullPointerException- whensourceisnull.
-
SumArrayFunction
Creates a sum function on a long array source.- Parameters:
source- The data source.- Throws:
NullPointerException- whensourceisnull.
-
SumArrayFunction
Create a sum function on a double array source.- Parameters:
source- The data source.- Throws:
NullPointerException- whensourceisnull.
-