public class PolynomialInterp extends LinearInterp
c, decr, x, y| Constructor and Description | 
|---|
PolynomialInterp()
Create an instance with no coordinates. 
 | 
PolynomialInterp(double[] x,
                double[] y)
Create an instance with the given coordinates. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
evalCoeffs()
Compute coefficients of Langrange interpolating polynomial
  of degree x.length - 1. 
 | 
double | 
evalPolynomial(double xp)
Evaluate a polynomial by Horner's schema 
 | 
double | 
interpolate(double xp)
Return the interpolated value corresponding to some arbitrary
 X coordinate. 
 | 
static void | 
main(String[] args)
Simple test entry point 
 | 
void | 
setCoords(double[] x,
         double[] y,
         boolean check)
Set or reset the coordinates used by this interpolator. 
 | 
guessStepappendValue, binarySearch, evalYData, evalYDataArray, getCount, getXCoord, getXCoords, getYCoord, getYCoords, isFull, isIncreasing, stepGuesspublic PolynomialInterp()
setValues must be made before any other methods.public PolynomialInterp(double[] x,
                        double[] y)
interpolate
 method. The X coordinates should be monotonic, either increasing or
 decreasing. Same value X coordinates are not allowed.x - the X coordinates.y - the Y coordinates.public void setCoords(double[] x,
                      double[] y,
                      boolean check)
InterpolatorsetCoords in interface InterpolatorsetCoords in class AbstractInterpolatorx - the X coordinates.y - the Y coordinates.check - whether to check the monotonic direction (compares
              0 and 1 values of x). Use this when you need to
              preserve the direction temporarily even though the
              order may currently be switched, but take care to
              reorder before interpolating.public double interpolate(double xp)
Interpolatorinterpolate in interface Interpolatorinterpolate in class LinearInterpxp - the X coordinate at which an interpolated Y
           coordinate is required.public double evalPolynomial(double xp)
protected void evalCoeffs()
public static void main(String[] args)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.