|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XY_DataSet
A wrapper for 2D double-valued data that provides access to data points via
Point2Ds.
Note: Use of the word 'Set' in this class does not imply adherence
to the Set interface. An XY_DataSet may contain multiple
identical points, although subclasses are free to provide alternate behavior.
| Field Summary |
|---|
| Fields inherited from interface org.opensha.commons.metadata.XMLSaveable |
|---|
XML_METADATA_NAME |
| Method Summary | |
|---|---|
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()
|
| Methods inherited from interface org.opensha.commons.data.Named |
|---|
getName |
| Methods inherited from interface org.opensha.commons.metadata.XMLSaveable |
|---|
toXMLMetadata |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
void setName(String name)
void setInfo(String info)
String getInfo()
int getNum()
double getMinX()
throws IndexOutOfBoundsException
IndexOutOfBoundsException
double getMaxX()
throws IndexOutOfBoundsException
IndexOutOfBoundsException
double getMinY()
throws IndexOutOfBoundsException
IndexOutOfBoundsException
double getMaxY()
throws IndexOutOfBoundsException
IndexOutOfBoundsExceptionPoint2D get(int index)
double getX(int index)
throws IndexOutOfBoundsException
IndexOutOfBoundsException
double getY(int index)
throws IndexOutOfBoundsException
IndexOutOfBoundsExceptiondouble getClosestY(double x)
x -
double getClosestX(double y)
y -
void set(Point2D point)
throws Point2DException
Point2DException
void set(double x,
double y)
throws Point2DException
Point2DException
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()
toString in class ObjectString 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 errors
void setXAxisName(String xName)
xName - StringString getXAxisName()
void setYAxisName(String xName)
xName - StringString getYAxisName()
List<Double> xValues()
List<Double> yValues()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||