|
|
A class for 1D-polynomials p(x) with real coefficients.
polynom ()
| polynom |
polynom (const polynom& rhs)
| polynom |
polynom (const string& file_name)
| polynom |
~polynom ()
| ~polynom |
polynom& operator= (const polynom& rhs)
| operator= |
double horner (const double x)
| horner |
[const]
Calculates p(x
) via the Horner scheme
Parameters:
x | evaluation point |
Returns: p(x
)
double polynom_mult (const double x)
| polynom_mult |
[const]
Calculates p(x
) via the a simple loop wherein the power of
x
is increased in each loop by multiplication.
Parameters:
x | evaluation point |
Returns: p(x
)
double polynom_pow (const double x)
| polynom_pow |
[const]
Calculates p(x
) via the a simple loop wherein the power of
x
is calculated with the pow(x,n) function.
Parameters:
x | evaluation point |
Returns: p(x
)
const int& degree ()
| degree |
[const]
Returns: polynomila degree
const double& operator[] (const int&i)
| operator[] |
[const]
Returns: coefficient for index i
which is related to the i-th power of x
double& operator[] (const int&i)
| operator[] |
Returns: coefficient for index i
which is related to the i-th power of x
int ngrad | ngrad |
[private]
double * coeff | coeff |
[private]