public interface XY_DataSet extends Named, Iterable<Point2D>
Point2Ds.
Note: Use of the word 'Set' in this class does not imply adherence
to the Set interface. An XY_DataGroup may contain multiple
identical points, although subclasses are free to provide alternate behavior.
| Modifier and Type | Method and Description |
|---|---|
boolean |
areAllXValuesInteger(double tolerance)
It finds out whether the X values are within tolerance of an integer value
|
XY_DataSet |
deepClone()
This function returns a new copy of this list, including copies of all the
points.
|
Point2D |
get(int index)
Returns the nth (x,y) point in the Function by index, or null if no such
point exists
|
double |
getClosestX(double y)
Get the X value for the point with closest Y
|
double |
getClosestY(double x)
Get the Y value for the point with closest X
|
String |
getInfo()
Returns the info of this function.
|
double |
getMaxX()
return the maximum x value along the x-axis
|
double |
getMaxY()
return the maximum y value along the y-axis
|
String |
getMetadataString()
prints out the state of the list, such as number of points, the value of
each point, etc.
|
double |
getMinX()
return the minimum x value along the x-axis.
|
double |
getMinY()
return the minimum y value along the y-axis
|
int |
getNum()
returns the number of points in this function list
|
double |
getX(int index)
Returns the x-value given an index
|
String |
getXAxisName()
Gets the name of the X Axis
|
Iterator<Double> |
getXValuesIterator()
Returns an iterator over all x-values in the list.
|
double |
getY(int index)
Returns the y-value given an index
|
String |
getYAxisName()
Gets the name of the Y Axis
|
Iterator<Double> |
getYValuesIterator()
Returns an iterator over all y-values in the list.
|
boolean |
hasPoint(double x,
double y)
Determine wheither a point exists in the list, as determined by it's
x-value within tolerance.
|
boolean |
hasPoint(Point2D point)
Determine wheither a point exists in the list, as determined by it's
x-value within tolerance.
|
void |
set(double x,
double y)
Creates a new DataPoint, then either adds it if it doesn't exist, or
replaces an existing one, within tolerance
|
void |
set(int index,
double Y)
Replaces a DataPoint y-value at the specifed index.
|
void |
set(Point2D point)
Either adds a new DataPoint, or replaces an existing one, within tolerance
|
void |
setInfo(String info)
Sets the info string of this function.
|
void |
setName(String name)
Sets the name of this function.
|
void |
setXAxisName(String xName)
Sets the name of the X Axis
|
void |
setYAxisName(String xName)
Sets the name of the X Axis
|
String |
toString()
Standard java function, usually used for debugging, prints out the state of
the list, such as number of points, the value of each point, etc.
|
List<Double> |
xValues() |
List<Double> |
yValues() |
forEach, iterator, spliteratorvoid setName(String name)
void setInfo(String info)
String getInfo()
int getNum()
double getMinX()
throws IndexOutOfBoundsException
IndexOutOfBoundsExceptiondouble getMaxX()
throws IndexOutOfBoundsException
IndexOutOfBoundsExceptiondouble getMinY()
throws IndexOutOfBoundsException
IndexOutOfBoundsExceptiondouble getMaxY()
throws IndexOutOfBoundsException
IndexOutOfBoundsExceptionPoint2D get(int index)
double getX(int index)
throws IndexOutOfBoundsException
IndexOutOfBoundsExceptiondouble getY(int index)
throws IndexOutOfBoundsException
IndexOutOfBoundsExceptiondouble getClosestY(double x)
x - double getClosestX(double y)
y - void set(Point2D point)
void set(double x,
double y)
void set(int index,
double Y)
throws IndexOutOfBoundsException
IndexOutOfBoundsExceptionboolean hasPoint(Point2D point)
boolean hasPoint(double x,
double y)
Iterator<Double> getXValuesIterator()
Iterator<Double> getYValuesIterator()
String toString()
String getMetadataString()
XY_DataSet deepClone()
Since this is a clone, you can modify it without changing the original.
boolean areAllXValuesInteger(double tolerance)
tolerance - tolerance value to consider rounding errorsvoid setXAxisName(String xName)
xName - StringString getXAxisName()
void setYAxisName(String xName)
xName - StringString getYAxisName()