public class IlvDoublePoints extends Object implements Serializable
Constructor and Description |
---|
IlvDoublePoints()
Creates an empty object, with no stored value.
|
IlvDoublePoints(double x,
double y)
Creates a new object that holds a single value pair.
|
IlvDoublePoints(int count)
Creates a new object and allocates storage for
count value pairs. |
IlvDoublePoints(int count,
double[] xValues,
double[] yValues)
Creates a new object and initializes it with the given values.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double[] x,
double[] y,
int count)
Appends the specified values to this object.
|
void |
add(double x,
double y)
Appends the specified values to this object.
|
void |
add(IlvDoublePoints pts)
Appends the contents of the specified object.
|
void |
add(int insertIdx,
double[] x,
double[] y,
int count)
Inserts the specified values at the specified index.
|
void |
dispose()
Releases the memory used by this object.
|
double |
getX(int i)
Returns the x-value at the specified index.
|
int |
getXFloor(int i)
Returns the integer coordinate of the x-value at the specified index.
|
double[] |
getXValues()
Returns the array holding the x-values.
|
double[] |
getXValuesClone()
Returns a copy of the x-values array.
|
double |
getY(int i)
Returns the y-value at the specified index.
|
int |
getYFloor(int i)
Returns the integer coordinate of the y-value at the specified index.
|
double[] |
getYValues()
Returns the array holding the y-values.
|
double[] |
getYValuesClone()
Returns a copy of the y-values array.
|
void |
remove(int start,
int count)
Removes the specified points.
|
void |
reset()
Resets the cardinal of this object to
0 . |
void |
set(int idx,
double x,
double y)
Modifies the coordinates of the point at the specified index.
|
void |
setSize(int count)
Specifies the number of points.
|
void |
setX(int i,
double x)
Changes the x-value at the specified index.
|
void |
setY(int i,
double y)
Changes the y-value at the specified index.
|
int |
size()
Returns the cardinal of this object.
|
void |
swapXYValues()
Swaps the x-values array and the y-values array.
|
String |
toString()
Returns a string representation of this object.
|
public IlvDoublePoints()
For optimal performance, you should dispose()
this object
when done with it.
public IlvDoublePoints(int count, double[] xValues, double[] yValues)
Note: The specified arrays are not copied.
For optimal performance, you should dispose()
this object
when done with it.
public IlvDoublePoints(int count)
count
value pairs.
For optimal performance, you should dispose()
this object
when done with it.
public IlvDoublePoints(double x, double y)
For optimal performance, you should dispose()
this object
when done with it.
public void dispose()
public void add(double x, double y)
x
- The new x-value.y
- The new y-value.public void add(double[] x, double[] y, int count)
x
- the x-values to add.y
- The y-values to add.count
- The number of values to add.public void add(int insertIdx, double[] x, double[] y, int count)
insertIdx
- The insertion index. This index must be less than or equal
to the number of values stored in this object.x
- The x-values to insert.y
- The y-values to insert.count
- The number of values to insert.public void remove(int start, int count)
start
- The index of the first point to remove.count
- The number of points to remove.public final void add(IlvDoublePoints pts)
public final double getX(int i)
public final int getXFloor(int i)
public final double getY(int i)
public final int getYFloor(int i)
public final void setX(int i, double x)
public final void setY(int i, double y)
public final void set(int idx, double x, double y)
idx
- The index of the considered point.x
- The new x-value.y
- The new y-value.public final int size()
public final double[] getXValues()
IlvDoublePoints
object. In order to add
new data, use the appropriate add
method.public final double[] getXValuesClone()
getXValues()
public final double[] getYValues()
IlvDoublePoints
object. In order to add
new data, use the appropriate add
method.public final double[] getYValuesClone()
getYValues()
public void setSize(int count)
getXValues().length
.getXValues()
,
getYValues()
public final void swapXYValues()
public void reset()
0
.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.