Package microsim.statistics.functions
Class SumArrayFunction.Long
java.lang.Object
microsim.statistics.functions.AbstractFunction
microsim.statistics.functions.AbstractArrayFunction
microsim.statistics.functions.SumArrayFunction
microsim.statistics.functions.SumArrayFunction.Long
- All Implemented Interfaces:
EventListener,IDoubleSource,ILongSource,IUpdatableSource
- Enclosing class:
- SumArrayFunction
SumFunction operating on long source values.
- Author:
- Michele Sonnessa
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.functions.SumArrayFunction
SumArrayFunction.Double, SumArrayFunction.Float, SumArrayFunction.Integer, SumArrayFunction.LongNested classes/interfaces inherited from interface microsim.statistics.IDoubleSource
IDoubleSource.VariablesNested classes/interfaces inherited from interface microsim.statistics.ILongSource
ILongSource.Variables -
Field Summary
FieldsFields inherited from class microsim.statistics.functions.AbstractArrayFunction
dblSource, fltSource, intSource, lngSource, type, TYPE_DBL, TYPE_FLT, TYPE_INT, TYPE_LNGFields inherited from class microsim.statistics.functions.AbstractFunction
timeChecker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(long[] data) Apply the function on a the given array of long values.doublegetDoubleValue(Enum<?> variableID) Return the double value corresponding to the given variableIDlonggetLongValue(Enum<?> id) Return the long value corresponding to the given variableIDMethods inherited from class microsim.statistics.functions.AbstractArrayFunction
apply, apply, apply, applyFunctionMethods inherited from class microsim.statistics.functions.AbstractFunction
isCheckingTime, onEvent, setCheckingTime, updateSource
-
Field Details
-
lsum
protected long lsum
-
-
Constructor Details
-
Long
Create a sum function on a long array source.- Parameters:
source- The data source.
-
-
Method Details
-
apply
public void apply(long[] data) Description copied from class:AbstractArrayFunctionApply the function on a the given array of long values.- Overrides:
applyin classAbstractArrayFunction- Parameters:
data- A source array of values.
-
getLongValue
Description copied from interface:ILongSourceReturn the long value corresponding to the given variableID- Specified by:
getLongValuein interfaceILongSource- Parameters:
id- A unique identifier for a variable.- Returns:
- The current long value of the required variable.
-
getDoubleValue
Description copied from interface:IDoubleSourceReturn the double value corresponding to the given variableID- Specified by:
getDoubleValuein interfaceIDoubleSource- Parameters:
variableID- A unique identifier for a variable.- Returns:
- The current double value of the required variable.
-