public abstract class Curve extends Object
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 and Description 

Curve() 
Modifier and Type  Method and Description 

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.

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)Copyright © 20012017 Big Faceless Organization