|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.graph.math.Curve
org.faceless.graph.math.DataCurve
public class DataCurve
A type of curve that represents data samples. If you're plotting data on a LineGraph then this the Curve you need to use.
Constructor Summary | |
---|---|
DataCurve()
|
Method Summary | |
---|---|
double |
get(double x)
Return the value of this curve at the specified X position. |
double[][] |
getForFit()
Return the data in the curve in a form that can be used by another curve - usually to fit a smoother curve to the samples. |
double |
getMax()
Return the maximum value that is defined for this curve. |
double |
getMin()
Return the minimum value that is defined for this curve. |
boolean |
point(double x)
If a marker is to be placed at this point on the curve then return true, otherwise return false. |
void |
set(double x,
double y)
Set the value of the curve at a specific value |
double[] |
steps()
Return the points on the curve that it should be sampled at to get an accurate picture of it. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataCurve()
Method Detail |
---|
public double getMin()
Curve
Double.POSITIVE_INFINITY
(yes, positive)
getMin
in class Curve
public double getMax()
Curve
Double.NEGATIVE_INFINITY
(yes, negative)
getMax
in class Curve
public boolean point(double x)
Curve
FunctionCurve
will return
false, but curves that have been fitted to a DataCurve
may
return any points from that DataCurve
that are matched
exactly by the fitted curve.
point
in class Curve
public void set(double x, double y)
x
- The X position on the curvey
- The value of the curve at this positionpublic double[][] getForFit()
Return the data in the curve in a form that can be used by another curve - usually to fit a smoother curve to the samples.
Returns an array of doubles that's 2xN, where N is the number of data samples. The first column is the X values, the second column the Y values.
public double get(double x)
Curve
Double.NaN
get
in class Curve
public double[] steps()
Curve
FunctionCurve
may return
an empty list if they wish, or if there are certain points that the
curve must be sampled at, it can return them here.
steps
in class Curve
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |