public class PolInterp extends Polynomial implements java.io.Serializable
| Constructor and Description |
|---|
PolInterp(double[] x,
double[] y)
Constructs a new polynomial interpolating through the given points
(x[0], y[0]), ..., (x[n], y[n]).
|
| Modifier and Type | Method and Description |
|---|---|
PolInterp |
clone() |
static double[] |
getCoefficients(double[] x,
double[] y)
Computes and returns the coefficients the polynomial interpolating
through the given points (x[0], y[0]), ..., (x[n], y[n]).
|
double[] |
getX()
Returns the x coordinates of the interpolated points.
|
double[] |
getY()
Returns the y coordinates of the interpolated points.
|
java.lang.String |
toString() |
static java.lang.String |
toString(double[] x,
double[] y)
Makes a string representation of a set of points.
|
derivative, derivative, derivativePolynomial, evaluate, getCoefficient, getCoefficients, getDegree, integral, integralPolynomial, setCoefficientspublic PolInterp(double[] x,
double[] y)
x - the x coordinates of the points.y - the y coordinates of the points.java.lang.NullPointerException - if x or y are null.java.lang.IllegalArgumentException - if the lengths of x and y are different,
or if less than two points are specified.public static double[] getCoefficients(double[] x,
double[] y)
x - the x coordinates of the points.y - the y coordinates of the points.public double[] getX()
public double[] getY()
public static java.lang.String toString(double[] x,
double[] y)
x - the x coordinates of the points.y - the y coordinates of the points.public java.lang.String toString()
toString in class Polynomialpublic PolInterp clone()
clone in class PolynomialTo submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.