|
SSJ V. labo. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.functions.Polynomial
umontreal.iro.lecuyer.functionfit.PolInterp
public class PolInterp
Represents a polynomial that interpolates through a set of points. More specifically, let (x0, y0),…,(xn, yn) be a set of points and p(x) the constructed polynomial of degree n. Then, for i = 0,…, n, p(xi) = yi.
| Constructor Summary | |
|---|---|
PolInterp(double[] x,
double[] y)
Constructs a new polynomial interpolating through the given points (x[0], y[0]), ..., (x[n], y[n]). |
|
| Method Summary | |
|---|---|
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. |
String |
toString()
|
static String |
toString(double[] x,
double[] y)
Makes a string representation of a set of points. |
| Methods inherited from class umontreal.iro.lecuyer.functions.Polynomial |
|---|
derivative, derivative, derivativePolynomial, evaluate, getCoefficient, getCoefficients, getDegree, integral, integralPolynomial, setCoefficients |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PolInterp(double[] x,
double[] y)
x - the x coordinates of the points.y - the y coordinates of the points.
NullPointerException - if x or y are null.
IllegalArgumentException - if the lengths of x and y are different,
or if less than two points are specified.| Method Detail |
|---|
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 String toString(double[] x,
double[] y)
x - the x coordinates of the points.y - the y coordinates of the points.
public String toString()
toString in class Polynomialpublic PolInterp clone()
clone in class Polynomial
|
SSJ V. labo. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||