Class 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.
      • Methods inherited from class org.faceless.graph.math.Curve

        get
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FunctionCurve

        public FunctionCurve()
    • 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. Most 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.
        Specified by:
        point in class 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 of 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.
        Specified by:
        steps in class Curve
      • 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 return Double.POSITIVE_INFINITY (yes, positive)
        Specified by:
        getMin in class Curve
      • getMax

        public double getMax()
        Description copied from class: Curve
        Return the maximum value that is defined for this curve. For curves with no maximum (like most mathematical functions), this should return Double.NEGATIVE_INFINITY (yes, negative)
        Specified by:
        getMax in class Curve