|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensourcephysics.numerics.LagrangeInterpolator
LagrangeInterpolator uses a polynomial interpolation formula to evaluate values between data points.
| Field Summary | |
protected double[] |
hornerCoef
Polynomial coefficients. |
| Constructor Summary | |
LagrangeInterpolator(double[] xdata,
double[] ydata)
Constructs a Lagrange interpolating polynomial from the given data using Horner's expansion for the representation of the polynomial. |
|
| Method Summary | |
double |
evaluate(double x)
Computes the interpolated y value for a given x value. |
double[] |
getCoefficients()
Gets the polynomial coefficients c in c[0] + c[1] * x + c[2] * x^2 + .... |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected double[] hornerCoef
| Constructor Detail |
public LagrangeInterpolator(double[] xdata,
double[] ydata)
xdata - double[]ydata - double[]| Method Detail |
public double evaluate(double x)
evaluate in interface Functionx - value
public double[] getCoefficients()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||