In file mydocsrc/iml_poly.h:

class polynomial

This class implements efficient evaluation of uni-variate polynomials

Inheritance:

polynomial


Public Methods

IML_DOUBLE operator() (IML_DOUBLE XVal)
This function evaluates the polynomial to double precision
IML_DOUBLE IML_REF operator[] (IML_USINT CoeffIndex)
This function provides access to the polynomial coefficients
polynomial ( polynomial IML_REF Poly )
Duplicate another polynomial.
polynomial (IML_USINT POrder)
Allocate a polynomial of order POrder
~polynomial (void)
Make sure to deallocate memory.

Documentation

This class implements efficient evaluation of uni-variate polynomials. By efficient, I mean the method of evaluation requiring the fewest computer instructions for a polynomial with arbiratrary order and coefficient values. The evaluation method for an Nth order polynomial is:

a0 + x(a1 + x(a2 + ...x*aN)...)

No exotic capabilities are included (like symbolic differentiation, although that would be easy to add) because I'm sure that someone else has already done it, whatever "it" happens to be. And they've probably done it in the "right" too. :-)
IML_DOUBLE IML_REF operator[](IML_USINT CoeffIndex)
This function provides access to the polynomial coefficients. The index is bounds checked. Use this to fill in the coefficient values. The constructor sets all coefficients to 1.0

IML_DOUBLE operator()(IML_DOUBLE XVal)
This function evaluates the polynomial to double precision.


Direct child classes:
hermite_polynomial

alphabetic index hierarchy of classes


generated by doc++