Class Weighted_SumArrayFunction.Float
java.lang.Object
microsim.statistics.functions.AbstractFunction
microsim.statistics.weighted.functions.AbstractWeightedArrayFunction
microsim.statistics.weighted.functions.Weighted_SumArrayFunction
microsim.statistics.weighted.functions.Weighted_SumArrayFunction.Float
- All Implemented Interfaces:
EventListener,IDoubleSource,IUpdatableSource
- Enclosing class:
- Weighted_SumArrayFunction
SumFunction operating on weighted float source values.
- Author:
- Michele Sonnessa and Ross Richardson
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.weighted.functions.Weighted_SumArrayFunction
Weighted_SumArrayFunction.Double, Weighted_SumArrayFunction.Float, Weighted_SumArrayFunction.Integer, Weighted_SumArrayFunction.LongNested classes/interfaces inherited from interface microsim.statistics.IDoubleSource
IDoubleSource.Variables -
Field Summary
FieldsFields inherited from class microsim.statistics.weighted.functions.AbstractWeightedArrayFunction
dblSource, fltSource, intSource, lngSource, type, TYPE_DBL, TYPE_FLT, TYPE_INT, TYPE_LNGFields inherited from class microsim.statistics.functions.AbstractFunction
timeChecker -
Constructor Summary
ConstructorsConstructorDescriptionFloat(IWeightedFloatArraySource source) Create a sum function on a weighted float array source. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(float[] data, double[] weights) Apply the function on a the given array of float values.doublegetDoubleValue(Enum<?> variableID) Return the double value corresponding to the given variableIDMethods inherited from class microsim.statistics.weighted.functions.AbstractWeightedArrayFunction
apply, apply, apply, applyFunctionMethods inherited from class microsim.statistics.functions.AbstractFunction
isCheckingTime, onEvent, setCheckingTime, updateSource
-
Field Details
-
fsum
protected double fsum
-
-
Constructor Details
-
Float
Create a sum function on a weighted float array source.- Parameters:
source- The data source.
-
-
Method Details
-
apply
public void apply(float[] data, double[] weights) Description copied from class:AbstractWeightedArrayFunctionApply the function on a the given array of float values.- Overrides:
applyin classAbstractWeightedArrayFunction- Parameters:
data- A source array of values.weights- An array of weights.
-
getDoubleValue
Description copied from interface:IDoubleSourceReturn 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.
-