|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectifi.dsb.CurveData
Class to hold data coordinates for a curve, along one axis. The coordinate values are copied to an internal storage buffer.
Implementation note: The double-precision floating point data values are scaled and converted into an integer-valued array of the same length. The integer values are pixel coordinates.
Curve,
Axis,
Graph,
Plot2D| Constructor Summary | |
CurveData(Axis axis,
Curve curve,
double[] data)
Constructs CurveData object. |
|
CurveData(Axis axis,
Curve curve,
double[] data,
int n)
Constructs CurveData object. |
|
CurveData(Plot2D plot,
Curve curve,
double[] data,
int orientation)
Construct CurveData object. |
|
| Method Summary | |
Curve |
getCurve()
Return reference to the curve this data belongs to. |
double[] |
getData()
Return reference to data values. |
int |
indexMax(double max)
Maximum data index where data values are at least as small as the parameter value. |
int |
indexMin(double min)
Minimum data index where data value is at least as large as the parameter value. |
void |
printDataArray()
Print the double-precision floating-point array. |
void |
printIntArray()
Print the scaled integer array. |
void |
setCurve(Curve curve)
Set reference to the curve this data belongs to. |
void |
updateIntArray()
Update the scaled integer array. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CurveData(Plot2D plot,
Curve curve,
double[] data,
int orientation)
plot - Plot where the curve-data will appear.curve - The curve this data belongs to.data - Curve coordinate values along the axis. The array is copied
to an internal storage buffer.orientation - Axis.VERTICAL or Axis.HORIZONTAL to tell which axis
the data are for.
public CurveData(Axis axis,
Curve curve,
double[] data)
axis - Axis which this data belongs to.curve - The curve this data belongs to.data - Curve coordinate values along the axis. The array is copied
to an internal storage buffer.
public CurveData(Axis axis,
Curve curve,
double[] data,
int n)
axis - Axis for this data.curve - The curve this data belongs to.data - Curve coordinate values along the axis. The array is copied
to an internal storage buffer.n - Number of data samples to copy (starting with the first).| Method Detail |
public Curve getCurve()
public void setCurve(Curve curve)
public double[] getData()
public int indexMin(double min)
min - Typically axis minimum.public int indexMax(double max)
max - Typically axis maximum.public void updateIntArray()
public void printIntArray()
public void printDataArray()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||