net.sourceforge.jabm.report
Class AbstractReportVariables
java.lang.Object
net.sourceforge.jabm.event.AbstractModel
net.sourceforge.jabm.report.AbstractReportVariables
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, EventListener, Model, Report, ReportVariables, XYReportVariables
- Direct Known Subclasses:
- FitnessReportVariables, PayoffByStrategyReportVariables, RandomVariateReportVariables, StrategyExecutionFrequency, SummaryStatisticsReportVariables, WeightedGraphMetrics
public abstract class AbstractReportVariables
- extends AbstractModel
- implements XYReportVariables
- See Also:
- Serialized Form
-
-
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timeStamp
protected long timeStamp
name
protected java.lang.String name
xVariableName
protected java.lang.String xVariableName
yVariableNames
protected java.util.List<java.lang.Object> yVariableNames
simulation
protected Simulation simulation
AbstractReportVariables
public AbstractReportVariables(java.lang.String name)
getVariableBindings
public java.util.Map<java.lang.Object,java.lang.Number> getVariableBindings()
- Description copied from interface:
Report
- Get the values calculated by this report.
- Specified by:
getVariableBindings
in interface Report
- Returns:
- A
Map
of user-readable variable names to their
associated values.
createVariable
public java.lang.Object createVariable(java.lang.String variableName)
recordMoments
public void recordMoments(java.lang.Object statName,
java.util.Map<java.lang.Object,java.lang.Number> variables,
org.apache.commons.math3.stat.descriptive.SummaryStatistics stats)
recordSummaryStatistics
public void recordSummaryStatistics(java.lang.Object statName,
java.util.Map<java.lang.Object,java.lang.Number> variables,
org.apache.commons.math3.stat.descriptive.SummaryStatistics stats)
compute
public void compute(SimEvent event)
- Description copied from interface:
ReportVariables
- Update variables.
- Specified by:
compute
in interface ReportVariables
getName
public java.lang.String getName()
- Specified by:
getName
in interface Report
- Specified by:
getName
in interface ReportVariables
setName
public void setName(java.lang.String name)
getTimeStamp
public long getTimeStamp()
eventOccurred
public void eventOccurred(SimEvent event)
- Specified by:
eventOccurred
in interface EventListener
dispose
public void dispose(SimEvent event)
- Description copied from interface:
ReportVariables
- Clean up any side effects (eg close file).
- Specified by:
dispose
in interface ReportVariables
initialise
public void initialise(SimEvent event)
- Description copied from interface:
ReportVariables
- Initialise the variables in response to event.
- Specified by:
initialise
in interface ReportVariables
getX
public java.lang.Number getX(int seriesIndex)
- Specified by:
getX
in interface XYReportVariables
getY
public java.lang.Number getY(int seriesIndex)
- Specified by:
getY
in interface XYReportVariables
- Parameters:
seriesIndex
- The index of the dependent variable.
- Returns:
- The value of the dependent variable in the given series.
getxVariableName
public java.lang.String getxVariableName()
- Specified by:
getxVariableName
in interface XYReportVariables
- Returns:
- The name of the independent variable.
getyVariableNames
public java.util.List<java.lang.Object> getyVariableNames()
- Specified by:
getyVariableNames
in interface XYReportVariables
- Returns:
- The names of the dependent variables.
getNumberOfSeries
public int getNumberOfSeries()
- Specified by:
getNumberOfSeries
in interface XYReportVariables
- Returns:
- The number of independent variables.
tag
public java.lang.String tag(java.lang.Object strategy)