public final class SmoothingPolynomial
extends java.lang.Object
Constructor and Description |
---|
SmoothingPolynomial(double... coeff)
Constructs a new polynomial with coefficients coeff.
|
Modifier and Type | Method and Description |
---|---|
SmoothingPolynomial |
clone() |
double |
derivative(double x) |
double |
derivative(double x,
int n) |
double |
evaluate(double x) |
double |
getCoefficient(int i)
Returns the ith coefficient of the polynomial.
|
void |
setCoefficients(double... coeff)
Sets the array of coefficients of this polynomial to coeff.
|
public SmoothingPolynomial(double... coeff)
coeff
- the coefficients of the polynomial.java.lang.NullPointerException
- if coeff is null.java.lang.IllegalArgumentException
- if the length of coeff is 0.public double getCoefficient(int i)
public void setCoefficients(double... coeff)
coeff
- the new array of coefficients.java.lang.NullPointerException
- if coeff is null.java.lang.IllegalArgumentException
- if the length of coeff is 0.public double evaluate(double x)
public double derivative(double x)
public double derivative(double x, int n)
public SmoothingPolynomial clone()
clone
in class java.lang.Object