|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart3djava.ChartObj
com.quinncurtis.chart3djava.ChartDataset
com.quinncurtis.chart3djava.GroupDataset
com.quinncurtis.chart3djava.TimeGroupDataset
public class TimeGroupDataset
Group data is a collection of data, where more than one dependent variable, the x's, corresponds to the independent one, the y's. The number of columns in this array must be equal to the number of data points, and the number of rows - to the number of dependent variables or groups. The TimeGroupDataset class extends the GroupDataset class so that it can use ChartCalendar values as the x- and y-values.
Field Summary |
---|
Fields inherited from class com.quinncurtis.chart3djava.ChartDataset |
---|
initialCondition, markLookaheadLimit |
Constructor Summary | |
---|---|
TimeGroupDataset()
The default constructor for the TimeGroupDataset class. |
|
TimeGroupDataset(CSV csv,
java.lang.String filename,
int rowskip,
int columnskip)
This constructor creates a new TimeGroupDataset object from a file consisting of comma separated values. |
|
TimeGroupDataset(java.lang.String sname,
double[] x,
java.util.GregorianCalendar[][] y)
This constructor creates a new, group TimeGroupDataset object where the y-values are GregorianCalendar values and the x-values are floating point numbers. |
|
TimeGroupDataset(java.lang.String sname,
double[] x,
java.util.GregorianCalendar[][] y,
double zvalue,
double depthvalue)
This constructor creates a new, group TimeGroupDataset object where the y-values are GregorianCalendar values and the x-values are floating point numbers. |
|
TimeGroupDataset(java.lang.String sname,
java.util.GregorianCalendar[] x,
double[][] y)
This constructor creates a new, group TimeGroupDataset object where the x-values are GregorianCalendar values and the y-values are floating point numbers. |
|
TimeGroupDataset(java.lang.String sname,
java.util.GregorianCalendar[] x,
double[][] y,
double zvalue,
double depthvalue)
This constructor creates a new, group TimeGroupDataset object where the x-values are GregorianCalendar values and the y-values are floating point numbers. |
|
TimeGroupDataset(java.lang.String sname,
java.util.GregorianCalendar[] x,
java.util.GregorianCalendar[][] y)
This constructor creates a new, group TimeGroupDataset object where the x- and y-values are GregorianCalendar values. |
|
TimeGroupDataset(java.lang.String sname,
int nrows,
int ncols)
This constructor creates a new, group TimeGroupDataset object of the specified size. |
Method Summary | |
---|---|
int |
addTimeGroupDataPoints(java.util.GregorianCalendar x,
double[] y)
This method adds a new xy point to a dataset, increasing its size by one. |
java.lang.Object |
clone()
Returns an object that is a clone of this TimeGroupDataset object. |
TimeGroupDataset |
compressTimeFieldGroupDataset(int ctypex,
int[] ctypey,
int timefield,
int startindex,
int endindex,
java.lang.String newname)
This methods creates and returns a new dataset that is the data reduced version of the source dataset. |
TimeGroupDataset |
compressTimeFieldGroupDataset(int ctypex,
int ctypey,
int timefield,
int startindex,
int endindex,
java.lang.String newname)
This methods creates and returns a new dataset that is the data reduced version of the source dataset. |
TimeGroupDataset |
compressTimeGroupDataset(int ctypex,
int[] ctypey,
int interval,
int startindex,
int endindex,
java.lang.String newname)
This methods creates and returns a new dataset that is the data reduced version of the source dataset. |
TimeGroupDataset |
compressTimeGroupDataset(int ctypex,
int ctypey,
int interval,
int startindex,
int endindex,
java.lang.String newname)
This methods creates and returns a new dataset that is the data reduced version of the source dataset. |
void |
copy(TimeGroupDataset source)
Copies the source dataset. |
int |
deleteTimeGroupDataPoints(int deletepoint)
Deletes a data point at the specified location, decreasing the size of the dataset by one. |
int |
errorCheck(int nerror)
Checks the TimeGroupDataset object for common errors. |
TimeSimpleDataset |
getTimeSimpleDataset(java.lang.String sname,
int group)
This methods creates a new, TimeSimpleDataset object using the x-values and the y-values of the specified group. |
java.util.GregorianCalendar[] |
getTimeXData()
This method returns a copy of the xData array, if it is based on time values. |
java.util.GregorianCalendar |
getTimeXDataValue(int index)
This method returns a time based x-value in a group datasets. |
java.util.GregorianCalendar[][] |
getTimeYData()
This method returns a copy of the yData array, if it is based on time values. |
java.util.GregorianCalendar |
getTimeYDataValue(int group,
int index)
This method returns a time based y-value in a group datasets. |
void |
initializeData(java.util.GregorianCalendar[] x,
double[][] y)
This method initializes the x- and y-data values of a time dataset where the x-values are GregorianCalendar values and the y-values are floating point numbers. |
void |
initializeData(java.util.GregorianCalendar[] x,
double[][] y,
double zvalue,
double depthvalue)
This method initializes the x- and y-data values of a time dataset where the x-values are GregorianCalendar values and the y-values are floating point numbers. |
void |
initializeData(java.lang.String sname,
double[] x,
java.util.GregorianCalendar[][] y)
This method initializes the name, x- and y-data values of a time dataset where the y-values are GregorianCalendar values and the x-values are floating point numbers. |
void |
initializeData(java.lang.String sname,
double[] x,
java.util.GregorianCalendar[][] y,
double zvalue,
double depthvalue)
This method initializes the name, x- and y-data values of a time dataset where the y-values are GregorianCalendar values and the x-values are floating point numbers. |
void |
initializeData(java.lang.String sname,
java.util.GregorianCalendar[] x,
double[][] y)
This method initializes the name, x- and y-data values of a time dataset where the x-values are GregorianCalendar values and the y-values are floating point numbers. |
void |
initializeData(java.lang.String sname,
java.util.GregorianCalendar[] x,
double[][] y,
double zvalue,
double depthvalue)
This method initializes the name, x- and y-data values of a time dataset where the x-values are GregorianCalendar values and the y-values are floating point numbers. |
void |
initializeData(java.lang.String sname,
java.util.GregorianCalendar[] x,
java.util.GregorianCalendar[][] y)
This method initializes the name, x- and y-data values of a time dataset that where the x- and y-values are GregorianCalendar values. |
void |
initializeTimeData(java.lang.String sname,
double[] x,
double[][] y)
This method initializes the name, x- and y-data values of a time dataset where the x-values are double representing msecs and the y-values are floating point numbers. |
int |
insertTimeGroupDataPoints(java.util.GregorianCalendar x,
double[] yvalue,
int insertpoint)
Insert a data point at the specified location, increasing the size of the dataset by one. |
void |
readTimeGroupDataset(CSV csv,
java.lang.String filename,
int rowskip,
int columnskip)
This method initializes the TimeGroupDataset object from a file consisting of comma separated values. |
void |
readTimeGroupDatasetAsResource(CSV csv,
java.io.BufferedReader pReader,
int rowskip,
int columnskip)
This method initializes the TimeGroupDataset object from a file consisting of comma separated values. |
void |
setTimeGroupDataColumn(java.util.GregorianCalendar x,
double[] y,
int ncolumn)
Sets the x- and y-values associated with a group dataset column index. |
void |
setTimeXDataValue(int index,
java.util.GregorianCalendar x)
Sets a time based x-value in a group dataset. |
void |
setTimeYDataValue(java.util.GregorianCalendar y,
int group,
int index)
Sets a time based y-value in a group dataset. |
void |
writeTimeGroupDataset(CSV csv,
java.lang.String filename)
This methods will create a text file and output the dataset to that file in a CSV (Comma Separated Value) format. |
void |
writeTimeGroupDataset(CSV csv,
java.lang.String filename,
boolean append)
This methods will create a text file and output the dataset to that file in a CSV (Comma Separated Value) format. |
Methods inherited from class com.quinncurtis.chart3djava.ChartObj |
---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeGroupDataset(java.lang.String sname, java.util.GregorianCalendar[] x, double[][] y)
sname
- Specifies the name of the dataset.x
- An array that specifies the x-values of a group dataset.y
- An array that specifies the y-values of a group dataset.public TimeGroupDataset(java.lang.String sname, java.util.GregorianCalendar[] x, double[][] y, double zvalue, double depthvalue)
sname
- Specifies the name of the dataset.x
- An array that specifies the x-values of a group dataset.y
- An array that specifies the y-values of a group dataset.zvalue
- Specifies the initialvalue of the implicitZValue property.depthvalue
- Specifies the initialvalue of the implicitDepthValue property.public TimeGroupDataset(java.lang.String sname, double[] x, java.util.GregorianCalendar[][] y)
sname
- Specifies the name of the dataset.x
- An array that specifies the x-values of a group dataset.y
- An array that specifies the y-values of a group dataset.public TimeGroupDataset(java.lang.String sname, double[] x, java.util.GregorianCalendar[][] y, double zvalue, double depthvalue)
sname
- Specifies the name of the dataset.x
- An array that specifies the x-values of a group dataset.y
- An array that specifies the y-values of a group dataset.zvalue
- Specifies the initialvalue of the implicitZValue property.depthvalue
- Specifies the initialvalue of the implicitDepthValue property.public TimeGroupDataset(java.lang.String sname, java.util.GregorianCalendar[] x, java.util.GregorianCalendar[][] y)
sname
- Specifies the name of the dataset.x
- An array that specifies the x-values of a group dataset.y
- An array that specifies the y-values of a group dataset.public TimeGroupDataset(java.lang.String sname, int nrows, int ncols)
sname
- Specifies the name of the dataset.nrows
- Number of rows, or groups in the dataset.ncols
- Number of columns, or numDatapoints in the dataset.public TimeGroupDataset(CSV csv, java.lang.String filename, int rowskip, int columnskip)
csv
- An instance of an CSV object.filename
- The name of the file.rowskip
- Skip this many rows before starting the read operation.columnskip
- For each row of data, skip this many columns before reading the first
value from the row.public TimeGroupDataset()
Method Detail |
---|
public int errorCheck(int nerror)
errorCheck
in class GroupDataset
nerror
- Current error state
public void initializeData(java.util.GregorianCalendar[] x, double[][] y)
x
- An array that specifies the x-values of a dataset.y
- An array the y-values of a dataset.public void initializeData(java.util.GregorianCalendar[] x, double[][] y, double zvalue, double depthvalue)
x
- An array that specifies the x-values of a dataset.y
- An array the y-values of a dataset.zvalue
- Specifies the initialvalue of the implicitZValue property.depthvalue
- Specifies the initialvalue of the implicitDepthValue property.public void initializeData(java.lang.String sname, java.util.GregorianCalendar[] x, double[][] y)
sname
- Specifies the name of the dataset.x
- An array that specifies the x-values of a dataset.y
- An array that specifies the y-values of a dataset.public void initializeData(java.lang.String sname, java.util.GregorianCalendar[] x, double[][] y, double zvalue, double depthvalue)
sname
- Specifies the name of the dataset.x
- An array that specifies the x-values of a dataset.y
- An array that specifies the y-values of a dataset.zvalue
- Specifies the initialvalue of the implicitZValue property.depthvalue
- Specifies the initialvalue of the implicitDepthValue property.public void initializeTimeData(java.lang.String sname, double[] x, double[][] y)
sname
- Specifies the name of the dataset.x
- An array that specifies the x-values of a dataset.y
- An array that specifies the y-values of a dataset.public void initializeData(java.lang.String sname, double[] x, java.util.GregorianCalendar[][] y)
sname
- Specifies the name of the dataset.x
- An array that specifies the x-values of a dataset.y
- An array that specifies the y-values of a dataset.public void initializeData(java.lang.String sname, double[] x, java.util.GregorianCalendar[][] y, double zvalue, double depthvalue)
sname
- Specifies the name of the dataset.x
- An array that specifies the x-values of a dataset.y
- An array that specifies the y-values of a dataset.zvalue
- Specifies the initialvalue of the implicitZValue property.depthvalue
- Specifies the initialvalue of the implicitDepthValue property.public void initializeData(java.lang.String sname, java.util.GregorianCalendar[] x, java.util.GregorianCalendar[][] y)
sname
- Specifies the name of the dataset.x
- An arra that specifies the x-values of a dataset.y
- An array that specifies the y-values of a dataset.public void copy(TimeGroupDataset source)
source
- The source dataset object.public java.lang.Object clone()
clone
in class GroupDataset
public void setTimeXDataValue(int index, java.util.GregorianCalendar x)
x
- Specifies the new x-value for the data point at the specified index.index
- Specifies the index for the new data value.public java.util.GregorianCalendar getTimeXDataValue(int index)
index
- Specifies the index of the x-value.
public void setTimeYDataValue(java.util.GregorianCalendar y, int group, int index)
y
- Specifies the new y-value for the data point at the specified index.group
- Specifies the group number for the new data value.index
- Specifies the index for the new data value.public void setTimeGroupDataColumn(java.util.GregorianCalendar x, double[] y, int ncolumn)
x
- Specifies the new x-value for the data point at the specified column index.y
- An array that specifies the new y-values for the group dataset at the specified column index.ncolumn
- Specifies the column index for the new data values.public int addTimeGroupDataPoints(java.util.GregorianCalendar x, double[] y)
x
- Specifies the new x-value for the data point at the specified index.y
- Specifies the new y-value for the data point at the specified index.
public java.util.GregorianCalendar getTimeYDataValue(int group, int index)
group
- Specifies the group of the y-value.index
- Specifies the index of the y-value.
public java.util.GregorianCalendar[] getTimeXData()
public java.util.GregorianCalendar[][] getTimeYData()
public int insertTimeGroupDataPoints(java.util.GregorianCalendar x, double[] yvalue, int insertpoint)
x
- The date x-value of the new data point to insert.yvalue
- An array size [numberGroups], of the y-values of the data points to insertinsertpoint
- The insertion point of the data. Zero based array indexing is used, so the 5th data
point in the array has an index value of 4.
public int deleteTimeGroupDataPoints(int deletepoint)
deletepoint
- The delete point. Zero based array indexing is used, so the 5th data point in the
array has an index value of 4.
public void writeTimeGroupDataset(CSV csv, java.lang.String filename)
csv
- An instance of an CSV object.filename
- The name of the file.public void writeTimeGroupDataset(CSV csv, java.lang.String filename, boolean append)
csv
- An instance of an CSV object.filename
- The name of the file.append
- True and if the file exists, data is appended to the file.public void readTimeGroupDataset(CSV csv, java.lang.String filename, int rowskip, int columnskip)
csv
- An instance of an CSV object.filename
- The name of the file.rowskip
- Skip this many rows before starting the read operation.columnskip
- For each row of data, skip this many columns before reading the first
value from the row.public void readTimeGroupDatasetAsResource(CSV csv, java.io.BufferedReader pReader, int rowskip, int columnskip)
csv
- An instance of an CSV object.pReader
- A BufferedReader data stream. Must support BufferedReader mark and reset methods.rowskip
- Skip this many rows before starting the read operation.columnskip
- For each row of data, skip this many columns before reading the first
value from the row.public TimeGroupDataset compressTimeGroupDataset(int ctypex, int ctypey, int interval, int startindex, int endindex, java.lang.String newname)
ctypex
- The compression type. Use one of the data compression type constants:
DATACOMPRESS_NONE (returns a dataset containing the points in the specified range, no compression),
DATACOMPRESS_SKIP (sample the dataset every interval points), DATACOMPRESS_AVERAGE (use the average
x- and y-value in each interval), DATACOMPRESS_MIN (use the minimum x- and y-value in each interval),
DATACOMPRESS_MAX (use the maximum x- and y-value in each interval), and DATACOMPRESS_MINMAX (use the minimum
and maximum x- and y-value in each interval).ctypey
- The compression type for the y-values. Use one of the data compression type constants.interval
- The number of data points in each segment that is reduced to a single
datapoint (two for the DATACOMPRESS_MINMAX compression type) in the compressed dataset.startindex
- The starting point, inclusive, in the source dataset for the data compression.endindex
- The ending index, inclusive, in the source dataset for the data compression.newname
- The string name for the new dataset.
public TimeGroupDataset compressTimeGroupDataset(int ctypex, int[] ctypey, int interval, int startindex, int endindex, java.lang.String newname)
ctypex
- The compression type. Use one of the data compression type constants:
DATACOMPRESS_NONE (returns a dataset containing the points in the specified range, no compression),
DATACOMPRESS_SKIP (sample the dataset every interval points), DATACOMPRESS_AVERAGE (use the average
x- and y-value in each interval), DATACOMPRESS_MIN (use the minimum x- and y-value in each interval),
DATACOMPRESS_MAX (use the maximum x- and y-value in each interval), and DATACOMPRESS_MINMAX (use the
minimum and maximum x- and y-value in each interval). The DATACOMPRESS_MINMAX compression type is
best used when the compressed data values number more than 1000, where adjacent data values in the
rendered chart differ by one horizontal pixel or less. The DATACOMPRESS_MINMAX compression type will
guarantee that the chart displays the same minimums and maximums as the original dataset.ctypey
- An array of compression types for the y-values, one for each group. Use one of
the data compression type constants.interval
- The number of data points in each segment that is reduced to a single
datapoint (two for the DATACOMPRESS_MINMAX compression type) in the compressed dataset.startindex
- The starting point, inclusive, in the source dataset for the data compression.endindex
- The ending index, inclusive, in the source dataset for the data compression.newname
- The string name for the new dataset.
public TimeGroupDataset compressTimeFieldGroupDataset(int ctypex, int[] ctypey, int timefield, int startindex, int endindex, java.lang.String newname)
ctypex
- The compression type. Use one of the data compression type constants:
DATACOMPRESS_NONE (returns a dataset containing the points in the specified range, no compression),
DATACOMPRESS_SKIP (sample the dataset every interval points), DATACOMPRESS_AVERAGE (use the average
x- and y-value in each interval), DATACOMPRESS_MIN (use the minimum x- and y-value in each interval),
DATACOMPRESS_MAX (use the maximum x- and y-value in each interval), and DATACOMPRESS_MINMAX (use the
minimum and maximum x- and y-value in each interval). The DATACOMPRESS_MINMAX compression type is best
used when the compressed data values number more than 1000, where adjacent data values in the rendered
chart differ by one horizontal pixel or less. The DATACOMPRESS_MINMAX compression type will guarantee
that the chart displays the same minimum and maximum as the original dataset.ctypey
- An array of compression types for the y-values, one for each group. Use one of the
data compression type constants.timefield
- All values with the same timefield value are compressed to a single value. Use one
of the time field constants in the ChartConstants.YEAR class - ChartConstants.YEAR, ChartConstants.YEAR.MONTH,
ChartConstants.YEAR.WEEK_OF_YEAR, ChartConstants.YEAR.WEEK_OF_MONTH, ChartConstants.YEAR.DAY_OF_YEAR, ChartConstants.YEAR.HOUR_OF_DAY,
ChartConstants.YEAR.MINUTE.startindex
- The starting point, inclusive, in the source dataset for the data compression.endindex
- The ending index, inclusive, in the source dataset for the data compression.newname
- The string name for the new dataset.
public TimeGroupDataset compressTimeFieldGroupDataset(int ctypex, int ctypey, int timefield, int startindex, int endindex, java.lang.String newname)
ctypex
- The compression type. Use one of the data compression type constants: DATACOMPRESS_NONE
(returns a dataset containing the points in the specified range, no compression), DATACOMPRESS_SKIP
(sample the dataset every interval points), DATACOMPRESS_AVERAGE (use the average x- and y-value in
each interval), DATACOMPRESS_MIN (use the minimum x- and y-value in each interval), DATACOMPRESS_MAX
(use the maximum x- and y-value in each interval), and DATACOMPRESS_MINMAX (use the minimum and maximum
x- and y-value in each interval).ctypey
- The compression type for the y-values. Use one of the data compression type constants.timefield
- All values with the same timefield value are compressed to a single value.
Use one of the time field constants in the ChartConstants.YEAR class - ChartConstants.YEAR, ChartConstants.YEAR.MONTH,
ChartConstants.YEAR.WEEK_OF_YEAR, ChartConstants.YEAR.WEEK_OF_MONTH, ChartConstants.YEAR.DAY_OF_YEAR, ChartConstants.YEAR.HOUR_OF_DAY,
ChartConstants.YEAR.MINUTE.startindex
- The starting point, inclusive, in the source dataset for the data compression.endindex
- The ending index, inclusive, in the source dataset for the data compression.newname
- The string name for the new dataset.
public TimeSimpleDataset getTimeSimpleDataset(java.lang.String sname, int group)
sname
- Specifies the name of the dataset.group
- Specifies the y-values to include in the new TimeSimpleDataset.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |