Class Polynomial

java.lang.Object
cnuphys.splot.fit.Polynomial
All Implemented Interfaces:
IValueGetter

public class Polynomial extends Object implements IValueGetter
  • Constructor Details

    • Polynomial

      public Polynomial(double[] a)
  • Method Details

    • value

      public double value(double x)
      Specified by:
      value in interface IValueGetter
    • findRoots

      public double[] findRoots(double xmin, double xmax)
      Find the roots of the polynomial in a range
      Parameters:
      xmin - the min value of the range
      xmax - the max value of the range
      Returns:
      an array of roots, or null
    • findXValsOfMaxima

      public Point2D.Double[] findXValsOfMaxima(double xmin, double xmax)
      Find the xy values of the maxima of the polynomial in a given range
      Parameters:
      xmin - the min value of the range
      xmax - the max value of the range
      Returns:
      and array of xy values, or null
    • getMaxNumberOfPositiveRoots

      public int getMaxNumberOfPositiveRoots()
    • getDerivative

      public Polynomial getDerivative()
    • maxNumPositiveRoots

      public static int maxNumPositiveRoots(double[] a)