|
|||||||||
| 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.SimpleDataset
com.quinncurtis.chart3djava.SimpleDataset3D
public class SimpleDataset3D
A simple 3D dataset class encapsulates x-, y- and z-data values that are to be used as source of chart information. Copies of the original data arrays are stored. The original source data can be deleted once the dataset is created. If you want to make any changes to the data, you must change the data in the dataset, not the original source data.
| Field Summary |
|---|
| Fields inherited from class com.quinncurtis.chart3djava.ChartDataset |
|---|
initialCondition, markLookaheadLimit |
| Constructor Summary | |
|---|---|
SimpleDataset3D()
The default SimpleDataset3D constructor. |
|
SimpleDataset3D(CSV csv,
java.lang.String filename,
int rowskip,
int columnskip)
This constructor creates a new SimpleDataset3D object from a file consisting of comma separated values. |
|
SimpleDataset3D(java.lang.String sname,
ChartPoint3D[] grid)
This constructor creates a new SimpleDataset3D object that will be placed in the specified coordinate system. |
|
SimpleDataset3D(java.lang.String sname,
double[] x,
double[] y,
double z)
This constructor creates a new SimpleDataset3D object that will be placed in the specified coordinate system. |
|
SimpleDataset3D(java.lang.String sname,
double[] x,
double[] y,
double[] z)
This constructor creates a new SimpleDataset3D object that will be placed in the specified coordinate system. |
|
SimpleDataset3D(java.lang.String sname,
double[] x,
double[] y,
double[] z,
double depthvalue)
This constructor creates a new SimpleDataset3D object that will be placed in the specified coordinate system. |
|
| Method Summary | |
|---|---|
boolean |
calcNearestPoint(PhysicalCoordinates transform,
ChartPoint3D testpoint,
int nmode,
NearestPointData nearestpoint)
This method compares a test point against all of the xy points in a contour dataset and calculates which point in the dataset is nearest the test point. |
java.lang.Object |
clone()
Returns an object that is a clone of this SimpleDataset3D object. |
SimpleDataset3D |
compressSimpleDataset3D(int ctypex,
int ctypey,
int ctypez,
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(SimpleDataset3D source)
Copies the source dataset. |
int |
errorCheck(int nerror)
Checks the current dataset object for common errors. |
ChartPoint3D |
getDataPoint(int index)
This method returns the x- and y-value of a point at the specified index. |
ChartPoint3D |
getDataPoint3D(int index)
This method returns the x-, y- and z-values of a point at the specified index. |
double |
getDatasetMax(int naxis)
This method returns the maximum value for either the xData, yData or zData arrays. |
double |
getDatasetMin(int naxis)
This method returns the minimum value for either the xData, yData or zData arrays. |
SimpleDataset |
getFastClipDataset(java.lang.String s,
PhysicalCoordinates transform,
int fastclipmode,
java.lang.Integer fastclipoffset)
This method returns a truncated dataset that only includes the datapoints within the current scaling limits, assuming the the data is monotonic in the x or y direction. |
int |
getFirstValidIndex()
This method returns the index of the first valid data point in a simple dataset. |
double |
getimplicitZValue()
Gete implicit z-value if the dataset is used to plot data in a 3D format. |
int |
getNumberGroups()
This method returns the value of the numberGroups field which is number of groups in a group dataset. |
double[] |
getZData()
This method returns a reference to the zData array. |
DoubleArray |
getZDataObj()
This method returns a reference to the protected DoubleArray used to store the z-values. |
double |
getZDataValue(int index)
This method returns the z-value in a contour dataset. |
boolean |
isDataPointGood(int index)
This method checks if the point at the specified index for a simple dataset is valid. |
void |
readSimpleDataset3D(CSV csv,
java.lang.String filename,
int rowskip,
int columnskip)
This method reads a contour dataset from a file consisting of comma separated values. |
void |
ResetBuffer()
This method resets the buffer back to its original state. |
int |
Resize(int n)
Resizes the dataset, maintaining the original data. |
void |
setDataPoint(int index,
ChartPoint3D p)
Sets the x-, y- and z-values for a data point in a contour dataset. |
void |
setDataPoint(int index,
double x,
double y,
double z)
Sets the x- and y- and z-values for a data point in a contour dataset. |
void |
setimplicitZValue(double value)
The implicit z-value if the dataset is used to plot data in a 3D format. |
void |
setZData(DoubleArray value)
This method sets the DoubleArray object used to store the z-values of the dataset. |
void |
setZDataValue(int index,
double z)
Sets the z-value in a contour dataset. |
void |
swapCoordinate(int arg1,
int arg2)
This method swaps the coordinates of the x-, y- or z- arrays of the underlying data. |
void |
writeSimpleDataset3D(CSV csv,
java.lang.String filename,
boolean append)
This method writes a contour dataset to a file as comma separated values. |
| Methods inherited from class com.quinncurtis.chart3djava.SimpleDataset |
|---|
addDataPoint, addDataPoint, checkValidData, checkValidDataX, checkValidDataY, combineDataset, compressSimpleDataset, convertToMovingAverage, copy, deleteDataPoint, getAverageY, getGroupDatasetSumMax, getGroupDatasetSumMin, getSumY, getYData, getYDataObj, getYDataValue, getYDataValue, initDataset, initDataset, initDataset, initializeData, initializeData, insertDataPoint, insertDataPoint, insertDatapointsAtCrossover, readSimpleDataset, resetBuffer, resize, setDataPoint, setYData, setYData, setYDataValue, setYDataValue, sortByX, writeSimpleDataset, writeSimpleDataset |
| 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 SimpleDataset3D(java.lang.String sname,
ChartPoint3D[] grid)
sname - Specifies the name of the dataset.grid - An array of ChartPoint3D points, that specifies the xyz values of a dataset.
public SimpleDataset3D(java.lang.String sname,
double[] x,
double[] y,
double[] z)
sname - Specifies the name of the dataset.x - An array that specifies the x-values of the dataset.y - An array that specifies the y-values of the dataset.z - An array that specifies the z-values of the dataset.
public SimpleDataset3D(java.lang.String sname,
double[] x,
double[] y,
double[] z,
double depthvalue)
sname - Specifies the name of the dataset.x - An array that specifies the x-values of the dataset.y - An array that specifies the y-values of the dataset.z - An array that specifies the z-values of the dataset.depthvalue - Specifies the initialvalue of the implicitDepthValue property.
public SimpleDataset3D(java.lang.String sname,
double[] x,
double[] y,
double z)
sname - Specifies the name of the dataset.x - An array that specifies the x-values of the dataset.y - An array that specifies the y-values of the dataset.z - A single value used to initialize the z-values of the dataset.
public SimpleDataset3D(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 SimpleDataset3D()
| Method Detail |
|---|
public int errorCheck(int nerror)
errorCheck in class SimpleDatasetnerror - Current error state.
public void copy(SimpleDataset3D source)
source - The source dataset object.public java.lang.Object clone()
clone in class SimpleDatasetpublic int Resize(int n)
n - The new size of the dataset.
public void ResetBuffer()
public int getFirstValidIndex()
getFirstValidIndex in class SimpleDatasetpublic double getDatasetMin(int naxis)
getDatasetMin in class SimpleDatasetnaxis - Specifies which data array to return the minimum value from. Use X_AXIS Y_AXIS or
Z_AXIS to specify which dataset array.
public double getDatasetMax(int naxis)
getDatasetMax in class SimpleDatasetnaxis - Specifies which data array to return the maximum value from. Use X_AXIS Y_AXIS or
Z_AXIS to specify which dataset array.
public void swapCoordinate(int arg1,
int arg2)
arg1 - The first of two coordinates to swap. User X_AXIS, Y_AXIS or Z_AXIS constants.arg2 - The second of two coordinates to swap. User X_AXIS, Y_AXIS or Z_AXIS constants.public double[] getZData()
getZData in class ChartDatasetpublic DoubleArray getZDataObj()
getZDataObj in class ChartDatasetpublic int getNumberGroups()
getNumberGroups in class SimpleDataset
public void setDataPoint(int index,
double x,
double y,
double z)
index - Specifies the index for the new data values.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.z - Specifies the new z-value for the data point at the specified index.
public void setDataPoint(int index,
ChartPoint3D p)
setDataPoint in class SimpleDatasetindex - Specifies the index for the new data values.p - Specifies the new x-, y- and z-values for the data point at the specified index.public ChartPoint3D getDataPoint3D(int index)
index - Specifies the index of the data point.
public void setZDataValue(int index,
double z)
setZDataValue in class ChartDatasetz - Specifies the new z-value for the data point at the specified index.index - Specifies the index for the data value.public double getZDataValue(int index)
getZDataValue in class ChartDatasetindex - Specifies the index of the z-value values.
public boolean isDataPointGood(int index)
isDataPointGood in class SimpleDatasetindex - Specifies the index to check in the xData and yData arrays.
public boolean calcNearestPoint(PhysicalCoordinates transform,
ChartPoint3D testpoint,
int nmode,
NearestPointData nearestpoint)
calcNearestPoint in class SimpleDatasettransform - The coordinate system of the test point.testpoint - The test point for the nearness calculation.nmode - Specifies the algorithm used in the nearness calculation.nearestpoint - Returns the parameters of the nearest point.
public void writeSimpleDataset3D(CSV csv,
java.lang.String filename,
boolean append)
csv - An instance of an CSV object.filename - The name of the file.append - Set to true to append to exisiting file.
public void readSimpleDataset3D(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 SimpleDataset3D compressSimpleDataset3D(int ctypex,
int ctypey,
int ctypez,
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.ctypez - The compression type for the z-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 SimpleDataset getFastClipDataset(java.lang.String s,
PhysicalCoordinates transform,
int fastclipmode,
java.lang.Integer fastclipoffset)
getFastClipDataset in class SimpleDatasets - A string specifying the new name of the dataset.transform - The transform that the dataset is clipped against.fastclipmode - Specifies if the data is clipped against the x-coordinate (FASTCLIP_X,
FASTCLIP_Y). )fastclipoffset - Returns the start offset of the fast clip data.
public ChartPoint3D getDataPoint(int index)
getDataPoint in class SimpleDatasetindex - Specifies the index of the data point.
public void setZData(DoubleArray value)
value - Set the z-value DoubleArray.public double getimplicitZValue()
public void setimplicitZValue(double value)
value - Sets the implicit z-value of the dataset.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||