cern.jet.math
Class Polynomial
java.lang.Object
|
+--cern.jet.math.Constants
|
+--cern.jet.math.Polynomial
- public class Polynomial
- extends Constants
Polynomial functions.
Method Summary |
static double |
p1evl(double x,
double[] coef,
int N)
Evaluates the given polynomial of degree N at x. |
static double |
polevl(double x,
double[] coef,
int N)
Evaluates the given polynomial of degree N at x. |
p1evl
public static double p1evl(double x,
double[] coef,
int N)
throws ArithmeticException
- Evaluates the given polynomial of degree N at x.
Evaluates polynomial when coefficient of N is 1.0.
Otherwise same as polevl().
2 N
y = C + C x + C x +...+ C x
0 1 2 N
Coefficients are stored in reverse order:
coef[0] = C , ..., coef[N] = C .
N 0
The function p1evl() assumes that coef[N] = 1.0 and is
omitted from the array. Its calling arguments are
otherwise the same as polevl().
In the interest of speed, there are no checks for out of bounds arithmetic.
- Parameters:
x
- argument to the polynomial.coef
- the coefficients of the polynomial.N
- the degree of the polynomial.
polevl
public static double polevl(double x,
double[] coef,
int N)
throws ArithmeticException
- Evaluates the given polynomial of degree N at x.
2 N
y = C + C x + C x +...+ C x
0 1 2 N
Coefficients are stored in reverse order:
coef[0] = C , ..., coef[N] = C .
N 0
In the interest of speed, there are no checks for out of bounds arithmetic.
- Parameters:
x
- argument to the polynomial.coef
- the coefficients of the polynomial.N
- the degree of the polynomial.
Submit a bug or feature. Check the Colt home page for the latest news.