Package org.faceless.graph.math
Class FunctionCurve
- java.lang.Object
-
- org.faceless.graph.math.Curve
-
- org.faceless.graph.math.FunctionCurve
-
- Direct Known Subclasses:
Polynomial
,SimpleCurve
,Spline
public abstract class FunctionCurve extends Curve
A Function Curve is the abstract superclass of any curves that represent a mathematical function. This is basically anything that isn't a
DataCurve
.The primary difference between a Function curve and a Data curve is that the former is sampled at many different positions on the curve to obtain an approximation of the curve, while a DataCurve is sampled only where a data entry exists
-
-
Constructor Summary
Constructors Constructor Description FunctionCurve()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.double[]
steps()
Return the points on the curve that it should be sampled at to get an accurate picture of it.
-
-
-
Method Detail
-
point
public boolean point(double x)
Description copied from class:Curve
If a marker is to be placed at this point on the curve then return true, otherwise return false. MostFunctionCurve
will return false, but curves that have been fitted to aDataCurve
may return any points from thatDataCurve
that are matched exactly by the fitted curve.
-
steps
public double[] steps()
Description copied from class:Curve
Return the points on the curve that it should be sampled at to get an accurate picture of it. Subclasses ofFunctionCurve
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.
-
getMin
public double getMin()
Description copied from class:Curve
Return the minimum value that is defined for this curve. For curves with no minimum (like most mathematical functions), this should returnDouble.POSITIVE_INFINITY
(yes, positive)
-
-