Class Weighted_SumArrayFunction
java.lang.Object
microsim.statistics.functions.AbstractFunction
microsim.statistics.weighted.functions.AbstractWeightedArrayFunction
microsim.statistics.weighted.functions.Weighted_SumArrayFunction
- All Implemented Interfaces:
EventListener
,DoubleSource
,UpdatableSource
- Direct Known Subclasses:
Weighted_SumArrayFunction.Double
,Weighted_SumArrayFunction.Integer
,Weighted_SumArrayFunction.Long
public abstract class Weighted_SumArrayFunction
extends AbstractWeightedArrayFunction
implements DoubleSource
This class computes the sum of an array of source values, with each element of the array multiplied by the weight of
the source (the source must implement the
Weight
interface). According to the source data type
there are three data-type oriented implementations. Each of them implements always the DoubleSource
interface.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
SumFunction operating on weighted double source values.static class
SumFunction operating on weighted integer source values.static class
SumFunction operating on weighted long source values.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
ConstructorDescriptionWeighted_SumArrayFunction
(@NonNull WeightedDoubleArraySource source) Create a sum function on a double array weighted-source.Weighted_SumArrayFunction
(@NonNull WeightedIntArraySource source) Create a sum function on an integer array weighted-source.Weighted_SumArrayFunction
(@NonNull WeightedLongArraySource source) Create a sum function on a long array weighted-source. -
Method Summary
Methods inherited from class microsim.statistics.weighted.functions.AbstractWeightedArrayFunction
apply, apply, apply, applyFunction
Methods inherited from class microsim.statistics.functions.AbstractFunction
isCheckingTime, onEvent, setCheckingTime, updateSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface microsim.statistics.DoubleSource
getDoubleValue
-
Constructor Details
-
Weighted_SumArrayFunction
Create a sum function on an integer array weighted-source.- Parameters:
source
- The weighted data source.
-
Weighted_SumArrayFunction
Create a sum function on a long array weighted-source.- Parameters:
source
- The weighted data source.
-
Weighted_SumArrayFunction
Create a sum function on a double array weighted-source.- Parameters:
source
- The weighted data source.
-