Class Weighted_SumArrayFunction.Double
java.lang.Object
microsim.statistics.functions.AbstractFunction
microsim.statistics.weighted.functions.AbstractWeightedArrayFunction
microsim.statistics.weighted.functions.Weighted_SumArrayFunction
microsim.statistics.weighted.functions.Weighted_SumArrayFunction.Double
- All Implemented Interfaces:
EventListener
,DoubleSource
,UpdatableSource
- Enclosing class:
Weighted_SumArrayFunction
SumFunction operating on weighted double 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
ConstructorDescriptionDouble
(@NonNull WeightedDoubleArraySource source) Create a sum function on a weighted double array source. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(double @NonNull [] data, double @NonNull [] weights) Apply the function to the given array of double values.double
getDoubleValue
(@NonNull Enum<?> id) 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
-
dsum
protected double dsum
-
-
Constructor Details
-
Double
Create a sum function on a weighted double array source.- Parameters:
source
- The data source.
-
-
Method Details
-
apply
public void apply(double @NonNull [] data, double @NonNull [] weights) Apply the function to the given array of double 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:
id
- A unique identifier for a variable.- Returns:
- The current double value of the required variable.
-