Package microsim.statistics.functions
Class MultiTraceFunction.Integer
java.lang.Object
microsim.statistics.functions.MultiTraceFunction
microsim.statistics.functions.MultiTraceFunction.Integer
- All Implemented Interfaces:
EventListener,IDoubleSource,IIntSource,IUpdatableSource
- Enclosing class:
- MultiTraceFunction
An implementation of the MemorylessSeries class, which manages integer type data sources.
- Author:
- Michele Sonnessa and Ross Richardson
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.functions.MultiTraceFunction
MultiTraceFunction.Double, MultiTraceFunction.Float, MultiTraceFunction.Integer, MultiTraceFunction.Long, MultiTraceFunction.VariablesNested classes/interfaces inherited from interface microsim.statistics.IIntSource
IIntSource.Variables -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intprotected longprotected IIntSourceFields inherited from class microsim.statistics.functions.MultiTraceFunction
count -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDoubleValue(Enum<?> valueID) Return the result of a given statistic.intgetIntValue(Enum<?> valueID) Return the result of a given statistic.intReturn the last int value read from the source object.intgetMax()The maximum function.doublegetMean()The mean function.intgetMin()The minimum function.intgetSum()The sum function.doubleThe variance function.voidRead the source values and update statistics.Methods inherited from class microsim.statistics.functions.MultiTraceFunction
getCount, onEvent
-
Field Details
-
max
protected int max -
min
protected int min -
sum
protected int sum -
sumSquare
protected long sumSquare -
target
-
-
Constructor Details
-
Integer
Create a basic statistic probe on a IDblSource object.- Parameters:
source- The IDblSource object.valueID- The value identifier defined by source object.
-
Integer
Create a basic statistic probe on a generic object.- Parameters:
source- A generic source object.valueName- The name of the field or the method returning the variable to be probed.getFromMethod- Specifies if valueName is a method or a property value.
-
-
Method Details
-
updateSource
public void updateSource()Read the source values and update statistics.- Specified by:
updateSourcein interfaceIUpdatableSource- Overrides:
updateSourcein classMultiTraceFunction
-
getDoubleValue
Return the result of a given statistic.- Specified by:
getDoubleValuein interfaceIDoubleSource- Overrides:
getDoubleValuein classMultiTraceFunction- Parameters:
valueID- One of the F_ constants representing available statistics.- Returns:
- The computed value.
- Throws:
UnsupportedOperationException- If the given valueID is not supported.
-
getIntValue
Return the result of a given statistic.- Specified by:
getIntValuein interfaceIIntSource- Parameters:
valueID- One of the F_ constants representing available statistics.- Returns:
- The computed value.
- Throws:
UnsupportedOperationException- If the given valueID is not supported.
-
getVariance
public double getVariance()The variance function.- Specified by:
getVariancein classMultiTraceFunction- Returns:
- The variance value.
-
getLastValue
public int getLastValue()Return the last int value read from the source object.- Returns:
- A int value collected at the last reading operation.
-
getMax
public int getMax()The maximum function.- Returns:
- The maximum value.
-
getSum
public int getSum()The sum function.- Returns:
- The sum of collected values.
-
getMin
public int getMin()The minimum function.- Returns:
- The minimum value.
-
getMean
public double getMean()The mean function.- Specified by:
getMeanin classMultiTraceFunction- Returns:
- The mean value.
-