|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.graph.math.Curve
public abstract class Curve
The abstract superclass for all curves. A curve is what's
plotted on a AbstractLineGraph
,
and has the property of always having a valid value between
it's two end ranges - ie f(x) is valid for every min<=x<=max.
All curves fall into one of two broad subclasses - a
DataCurve
, where the values of the curve reflect
various data points, and a FunctionCurve
, where the
values of the curve reflect a mathematical function.
DataCurve
,
FunctionCurve
,
Spline
,
Polynomial
Constructor Summary | |
---|---|
Curve()
|
Method Summary | |
---|---|
abstract double |
get(double x)
Return the value of this curve at the specified X position. |
abstract double |
getMax()
Return the maximum value that is defined for this curve. |
abstract double |
getMin()
Return the minimum value that is defined for this curve. |
abstract boolean |
point(double x)
If a marker is to be placed at this point on the curve then return true, otherwise return false. |
abstract double[] |
steps()
Return the points on the curve that it should be sampled at to get an accurate picture of it. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Curve()
Method Detail |
---|
public abstract double get(double x)
Double.NaN
public abstract double[] steps()
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.
public abstract boolean point(double x)
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.
public abstract double getMin()
Double.POSITIVE_INFINITY
(yes, positive)
public abstract double getMax()
Double.NEGATIVE_INFINITY
(yes, negative)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |