Package microsim.statistics.functions
Class MinTraceFunction.Float
- java.lang.Object
-
- microsim.statistics.functions.AbstractFunction
-
- microsim.statistics.functions.MinTraceFunction
-
- microsim.statistics.functions.MinTraceFunction.Float
-
- All Implemented Interfaces:
EventListener
,IDoubleSource
,IFloatSource
,IUpdatableSource
- Enclosing class:
- MinTraceFunction
public static class MinTraceFunction.Float extends MinTraceFunction implements IFloatSource
An implementation of the MemorylessSeries class, which manages float type data sources.Title: JAS
Description: Java Agent-based Simulation library
Copyright (C) 2002 Michele Sonnessa
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.- Author:
- Michele Sonnessa and Ross Richardson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class microsim.statistics.functions.MinTraceFunction
MinTraceFunction.Double, MinTraceFunction.Float, MinTraceFunction.Integer, MinTraceFunction.Long, MinTraceFunction.Variables
-
Nested classes/interfaces inherited from interface microsim.statistics.IFloatSource
IFloatSource.Variables
-
-
Constructor Summary
Constructors Constructor Description Float(java.lang.Object source, java.lang.String valueName, boolean getFromMethod)
Create a basic statistic probe on a generic object.Float(IFloatSource source, java.lang.Enum<?> valueID)
Create a basic statistic probe on a IDblSource object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyFunction()
Read the source values and update statistics.double
getDoubleValue(java.lang.Enum<?> valueID)
Return the result of a given statistic.float
getFloatValue(java.lang.Enum<?> valueID)
Return the result of a given statistic.float
getLastValue()
Return the last double value read from the source object.float
getMin()
The minimum function.-
Methods inherited from class microsim.statistics.functions.MinTraceFunction
onEvent
-
Methods inherited from class microsim.statistics.functions.AbstractFunction
isCheckingTime, setCheckingTime, updateSource
-
-
-
-
Constructor Detail
-
Float
public Float(IFloatSource source, java.lang.Enum<?> valueID)
Create a basic statistic probe on a IDblSource object.- Parameters:
source
- The IDblSource object.valueID
- The value identifier defined by source object.
-
Float
public Float(java.lang.Object source, java.lang.String valueName, boolean getFromMethod)
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 Detail
-
applyFunction
public void applyFunction()
Read the source values and update statistics.- Overrides:
applyFunction
in classMinTraceFunction
-
getDoubleValue
public double getDoubleValue(java.lang.Enum<?> valueID)
Return the result of a given statistic.- Specified by:
getDoubleValue
in interfaceIDoubleSource
- Parameters:
valueID
- One of the F_ constants representing available statistics.- Returns:
- The computed value.
- Throws:
java.lang.UnsupportedOperationException
- If the given valueID is not supported.
-
getFloatValue
public float getFloatValue(java.lang.Enum<?> valueID)
Return the result of a given statistic.- Specified by:
getFloatValue
in interfaceIFloatSource
- Parameters:
valueID
- One of the F_ constants representing available statistics.- Returns:
- The computed value.
- Throws:
java.lang.UnsupportedOperationException
- If the given valueID is not supported.
-
getLastValue
public float getLastValue()
Return the last double value read from the source object.- Returns:
- A double value collected at the last reading operation.
-
getMin
public float getMin()
The minimum function.- Returns:
- The minimum value.
-
-