public class LinearInterp extends AbstractInterpolator
c, decr, x, y
Constructor and Description |
---|
LinearInterp()
Create an instance with no coordinates.
|
LinearInterp(double[] x,
double[] y)
Create an instance with the given coordinates.
|
Modifier and Type | Method and Description |
---|---|
int |
guessStep() |
double |
interpolate(double xp)
Return the interpolated value corresponding to some arbitrary
X coordinate.
|
static void |
main(String[] args)
Simple test entry point
|
appendValue, binarySearch, evalYData, evalYDataArray, getCount, getXCoord, getXCoords, getYCoord, getYCoords, isFull, isIncreasing, setCoords, stepGuess
public LinearInterp()
setValues
must be made before any other methods.public LinearInterp(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 double interpolate(double xp)
Interpolator
interpolate
in interface Interpolator
interpolate
in class AbstractInterpolator
xp
- the X coordinate at which an interpolated Y
coordinate is required.public int guessStep()
public static void main(String[] args)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.