class polynom

A class for polynomials with real coefficients. More...

Definition#include <bsp_28_fkt.hpp>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Private Members


Detailed Description

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:
xevaluation 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:
xevaluation 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:
xevaluation 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]