|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.lenkaspace.creeper.report.CRBaseReport
net.lenkaspace.creeper.report.CRTimeSeriesReport
public class CRTimeSeriesReport
Creates graphical time series reports, usually of a single run / trial. For better performance, maintain an instance that opens and closes with (updated) data rather than creating a new popup every time.
| Nested Class Summary | |
|---|---|
static class |
CRTimeSeriesReport.FUNCTION
|
| Constructor Summary | |
|---|---|
CRTimeSeriesReport(java.lang.String title_,
java.lang.String[] variableNames_)
Constructor |
|
CRTimeSeriesReport(java.lang.String title_,
java.lang.String[] variableNames_,
java.awt.Dimension size_)
Constructor |
|
| Method Summary | |
|---|---|
void |
addValue(double value_)
Register a new value for a 0th index of the overal value set |
void |
addValue(double value_,
int variableIndex_)
Register a new value for a specific index of the overal value set |
void |
addValue(double value_,
java.lang.String variableName_)
Register a new value for a specific variable name from the overal value set |
void |
addValueSet(double[] values_)
Register new value set for the current time step. |
void |
createSelf(java.lang.String printToFileName_,
boolean show_)
Create a window of the report. |
void |
createSelfAsText(java.lang.String printToFileName_)
Save a textual representation of data, where columns represent individual variables (tab-separated) and rows represent different time steps. |
boolean |
getShouldOutputVariableNames()
|
double |
getVariableMean(int variableIndex_,
org.jfree.data.Range timeRange_)
Get mean of a data series identified by a variable index. |
double |
getVariableMean(java.lang.String variableName_,
org.jfree.data.Range timeRange_)
Get mean of a data series identified by a variable name |
void |
onRunStart(int runNumber_)
Called by CRController each time a run starts. |
void |
onTrialEnd(int trialNumber_,
int runNumber_)
Save self to an image if allowed |
void |
onTrialStart(int trialNumber_,
int runNumber_)
Called by CRController each time a trial starts. |
void |
onUpdateLoopEnd(int timeCounter_,
int timeUnit_)
Called from CRController after onUpdateLoopEnd() of all world objects is called. |
void |
onUpdateLoopStart(int timeCounter_,
int timeUnit_)
Called from CRController before onUpdateLoopStart() of all world objects is called. |
void |
setColors(java.awt.Color[] colors_)
|
void |
setIsScatterPlot(boolean value_)
|
void |
setShapes(java.awt.Shape[] shapes_)
|
void |
setShouldDisplayLegend(boolean value_)
|
void |
setShouldOutputVariableNames(boolean value_)
If set to true, variable names will be printed as the 1st row in the text ouput |
void |
setStrokes(java.awt.Stroke[] strokes_)
|
void |
setXAxisTitle(java.lang.String value_)
|
void |
setYAxisDisplayRange(org.jfree.data.Range range_)
|
void |
setYAxisTitle(java.lang.String value_)
|
| Methods inherited from class net.lenkaspace.creeper.report.CRBaseReport |
|---|
display, getDisplaysWindow, getFileName, onRunEnd, onSimulationEnd, onSimulationStart, setController, setReportController |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CRTimeSeriesReport(java.lang.String title_,
java.lang.String[] variableNames_)
title_ - String title of the reportvariableNames_ - String array of variable names to identify different time series lines
public CRTimeSeriesReport(java.lang.String title_,
java.lang.String[] variableNames_,
java.awt.Dimension size_)
title_ - String title of the reportvariableNames_ - String array of variable names to identify different time series linessize_ - Dimension size of the report window| Method Detail |
|---|
public void onRunStart(int runNumber_)
onRunStart in class CRBaseReportrunNumber_ - int new run number
public void onTrialStart(int trialNumber_,
int runNumber_)
onTrialStart in class CRBaseReporttrialNumber_ - int new trial numberrunNumber_ - int current run number
public void onTrialEnd(int trialNumber_,
int runNumber_)
onTrialEnd in class CRBaseReporttrialNumber_ - int ending trial numberrunNumber_ - int current run number
public void onUpdateLoopStart(int timeCounter_,
int timeUnit_)
onUpdateLoopStart in class CRBaseReporttimeUnit_ - int current time unittimeCounter_ - int current time counter, i.e. part of the timeUnit_
public void onUpdateLoopEnd(int timeCounter_,
int timeUnit_)
onUpdateLoopEnd in class CRBaseReporttimeUnit_ - int current time unittimeCounter_ - int current time counter, i.e. part of the timeUnit_public void addValueSet(double[] values_)
values_ - double[] array of values
public void addValue(double value_,
java.lang.String variableName_)
value_ - double new valuevariableName_ - String variable name from the variable name set this object was initialised withpublic void addValue(double value_)
value_ - double new value
public void addValue(double value_,
int variableIndex_)
value_ - double new valuevariableIndex_ - int 0 <= index < size of set names
public void createSelf(java.lang.String printToFileName_,
boolean show_)
createSelf in class CRBaseReportprintToFileName_ - String file name to print report into, without extensionshow_ - boolean if false, report is hidden immediately after printedpublic void createSelfAsText(java.lang.String printToFileName_)
printToFileName_ - String path + file name
public double getVariableMean(java.lang.String variableName_,
org.jfree.data.Range timeRange_)
variableName_ - String variable nametimeRange_ - Range time range
public double getVariableMean(int variableIndex_,
org.jfree.data.Range timeRange_)
variableIndex_ - int variable indextimeRange_ - Range time range
public void setIsScatterPlot(boolean value_)
public void setColors(java.awt.Color[] colors_)
public void setShapes(java.awt.Shape[] shapes_)
public void setStrokes(java.awt.Stroke[] strokes_)
public void setShouldDisplayLegend(boolean value_)
public void setYAxisTitle(java.lang.String value_)
public void setXAxisTitle(java.lang.String value_)
public void setYAxisDisplayRange(org.jfree.data.Range range_)
public void setShouldOutputVariableNames(boolean value_)
value_ - booleanpublic boolean getShouldOutputVariableNames()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||