Class Weighted_SumArrayFunction.Integer
java.lang.Object
microsim.statistics.functions.AbstractFunction
microsim.statistics.weighted.functions.AbstractWeightedArrayFunction
microsim.statistics.weighted.functions.Weighted_SumArrayFunction
microsim.statistics.weighted.functions.Weighted_SumArrayFunction.Integer
- All Implemented Interfaces:
EventListener
,DoubleSource
,UpdatableSource
- Enclosing class:
Weighted_SumArrayFunction
SumFunction operating on weighted integer source values.
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.weighted.functions.Weighted_SumArrayFunction
Weighted_SumArrayFunction.Double, Weighted_SumArrayFunction.Integer, Weighted_SumArrayFunction.Long
Nested classes/interfaces inherited from interface microsim.statistics.DoubleSource
DoubleSource.Variables
-
Field Summary
Fields inherited from class microsim.statistics.weighted.functions.AbstractWeightedArrayFunction
dblSource, intSource, lngSource, type, TYPE_DBL, TYPE_INT, TYPE_LNG
Fields inherited from class microsim.statistics.functions.AbstractFunction
timeChecker
-
Constructor Summary
ConstructorDescriptionInteger
(@NonNull WeightedIntArraySource source) Create a sum function on a weighted integer array source. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(int @NonNull [] data, double @NonNull [] weights) Apply the function to the given array of integer values.double
getDoubleValue
(@NonNull Enum<?> variableID) Returns the double value corresponding to the given variableIDMethods inherited from class microsim.statistics.weighted.functions.AbstractWeightedArrayFunction
apply, apply, applyFunction
Methods inherited from class microsim.statistics.functions.AbstractFunction
isCheckingTime, onEvent, setCheckingTime, updateSource
-
Field Details
-
isum
protected double isum
-
-
Constructor Details
-
Integer
Create a sum function on a weighted integer array source.- Parameters:
source
- The weighted data source.
-
-
Method Details
-
apply
public void apply(int @NonNull [] data, double @NonNull [] weights) Apply the function to the given array of integer values.- Overrides:
apply
in classAbstractWeightedArrayFunction
- Parameters:
data
- A source array of values.weights
- An array of weights.
-
getDoubleValue
Returns the double value corresponding to the given variableID- Parameters:
variableID
- A unique identifier for a variable.- Returns:
- The current double value of the required variable.
-