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,IDoubleSource,IUpdatableSource
- Enclosing class:
- Weighted_SumArrayFunction
public static class Weighted_SumArrayFunction.Double
extends Weighted_SumArrayFunction
implements IDoubleSource
SumFunction operating on weighted double 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
ConstructorsConstructorDescriptionDouble(IWeightedDoubleArraySource source) Create a sum function on a weighted double array source. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(double[] data, double[] weights) Apply the function on a the given array of double values.doublegetDoubleValue(Enum<?> id) 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
-
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[] data, double[] weights) Description copied from class:AbstractWeightedArrayFunctionApply the function on a the given array of double 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- Specified by:
getDoubleValuein interfaceIDoubleSource- Parameters:
id- A unique identifier for a variable.- Returns:
- The current double value of the required variable.
-