|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjas.statistics.TimeSeries
public class TimeSeries
It is a collection of series (data panel). It contains more series synching their time.
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 8Place, Suite 330, Boston, MA 02111-1307, USA.
| Field Summary | |
|---|---|
static char |
DEFAULT_SEPARATOR
The character used to separate data in the output file. |
static int |
EVENT_SAVE
A custom event identifier for perfomAction method. |
| Constructor Summary | |
|---|---|
TimeSeries()
Create a new time series container. |
|
| Method Summary | |
|---|---|
void |
addSeries(java.lang.Object target,
java.lang.String variableName,
boolean getFromMethod)
Add a new series. |
void |
addSeries(Series aSeries)
Add a new series. |
void |
addSeries(java.lang.String name,
IDoubleSource source,
int valueID)
Add a new series. |
void |
addSeries(java.lang.String name,
IFloatSource source,
int valueID)
Add a new series. |
void |
addSeries(java.lang.String name,
IIntSource source,
int valueID)
Add a new series. |
void |
addSeries(java.lang.String name,
ILongSource source,
int valueID)
Add a new series. |
java.lang.String |
getFileName()
Return the current output file name. |
Series |
getSeries(int seriesIndex)
Return a series at the given index. |
int |
getSeriesCount()
Return the number of series. |
java.util.ArrayList |
getSeriesList()
Return the list of contained time series. |
void |
performAction(int actionType)
Perform one of the defined actions. |
void |
saveToFile()
Store the entire data content on the output file. |
void |
saveToFile(java.lang.String path,
java.lang.String fileName)
Store the entire data content on the given output file. |
void |
saveToFile(java.lang.String path,
java.lang.String fileName,
boolean withTimes)
Store the entire data content on the given output file. |
void |
saveToFile(java.lang.String path,
java.lang.String fileName,
boolean withTimes,
char separator)
Store the entire data content on the given output file. |
void |
setFileName(java.lang.String fileName)
Set the output file name. |
void |
updateSource()
Update all the contained time series and the current time. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char DEFAULT_SEPARATOR
public static final int EVENT_SAVE
| Constructor Detail |
|---|
public TimeSeries()
| Method Detail |
|---|
public void addSeries(java.lang.Object target,
java.lang.String variableName,
boolean getFromMethod)
target - A generic source object.variableName - 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.public void addSeries(Series aSeries)
aSeries - An instance of the SeriesStats class.
java.lang.IllegalArgumentException - If the series name already exists.
public void addSeries(java.lang.String name,
IDoubleSource source,
int valueID)
name - Name of the statistic object.source - The IDoubleSource object.valueID - The value identifier defined by source object.
public void addSeries(java.lang.String name,
IFloatSource source,
int valueID)
name - Name of the statistic object.source - The IFloatSource object.valueID - The value identifier defined by source object.
public void addSeries(java.lang.String name,
IIntSource source,
int valueID)
name - Name of the statistic object.source - The IIntSource object.valueID - The value identifier defined by source object.
public void addSeries(java.lang.String name,
ILongSource source,
int valueID)
name - Name of the statistic object.source - The ILongSource object.valueID - The value identifier defined by source object.public java.lang.String getFileName()
public Series getSeries(int seriesIndex)
seriesIndex - The name of the series.
java.lang.IndexOutOfBoundsException - If seriesIndex is out of bounds.public int getSeriesCount()
public java.util.ArrayList getSeriesList()
public void performAction(int actionType)
performAction in interface ISimEventListeneractionType - One of the following actions:public void saveToFile()
public void saveToFile(java.lang.String path,
java.lang.String fileName)
path - The optional path string. Passing an empty string it is ignored.fileName - The name of the output file.
public void saveToFile(java.lang.String path,
java.lang.String fileName,
boolean withTimes)
path - The optional path string. Passing an empty string it is ignored.fileName - The name of the output file.withTimes - If true time description is saved. Only absolute time
is saved if false.
public void saveToFile(java.lang.String path,
java.lang.String fileName,
boolean withTimes,
char separator)
path - The optional path string. Passing an empty string it is ignored.fileName - The name of the output file.withTimes - If true time description is saved. Only absolute time
is saved if false.separator - The character used to separate data.
java.io.IOException - In case of IO error.public void setFileName(java.lang.String fileName)
fileName - A valid path for the output file name.public void updateSource()
updateSource in interface IUpdatableSource
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||