Package sim.util.distribution
Class Polynomial
java.lang.Object
sim.util.distribution.Constants
sim.util.distribution.Polynomial
- All Implemented Interfaces:
Serializable
Polynomial functions.
- See Also:
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Makes this class non instantiable, but still let's others inherit from it. -
Method Summary
-
Constructor Details
-
Polynomial
protected Polynomial()Makes this class non instantiable, but still let's others inherit from it.
-
-
Method Details
-
p1evl
Evaluates the given polynomial of degree N at x, assuming coefficient of N is 1.0. Otherwise same as polevl().2 N y = C + C x + C x +...+ C x 0 1 2 N where C = 1 and hence is omitted from the array. N Coefficients are stored in reverse order: coef[0] = C , ..., coef[N-1] = C . N-1 0 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.- Throws:
ArithmeticException
-
polevl
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.- Throws:
ArithmeticException
-