ug4
|
#include <polynomial1d.h>
Public Member Functions | |
size_t | degree () const |
Polynomial1D | derivative () const |
returns the derivative of this polynomial as a polynomial | |
Polynomial1D & | operator*= (const Polynomial1D &v) |
multiply by a polynomial | |
Polynomial1D & | operator*= (number scale) |
multiply by a scalar | |
Polynomial1D (const std::vector< number > &a) | |
Constructor passing coefficients for the polynomial. | |
Polynomial1D (size_t degree=0) | |
Constructor producing zero polynomial of degree 'degree'. | |
number | value (const number x) const |
evaluate the value of the polynom at x | |
Protected Member Functions | |
void | set_coefficients (const std::vector< number > &a) |
Private Attributes | |
std::vector< number > | m_vCoeff |
Friends | |
std::ostream & | operator<< (std::ostream &outStream, Polynomial1D &v) |
base class for one dimensional polynomials This class is used to represent polynomials in one variable. For the evaluation the horner scheme is used. Note that using this representation the computation of higher order derivatives turns out easier than by hard coded implementations.
|
inline |
Constructor producing zero polynomial of degree 'degree'.
|
inline |
Constructor passing coefficients for the polynomial.
References m_vCoeff.
|
inline |
returns the degree of the polynomial. This function returns the degree of the polynomial, i.e. the highest coefficient stored. Note that no checking is performed if the leading coefficient is zero.
References m_vCoeff.
Referenced by ug::BoundedEquidistantLagrange1D::BoundedEquidistantLagrange1D(), derivative(), ug::EquidistantLagrange1D::EquidistantLagrange1D(), operator*=(), operator*=(), ug::EquidistantLagrange1D::position(), ug::TruncatedEquidistantLagrange1D::position(), ug::BoundedEquidistantLagrange1D::position(), and ug::TruncatedEquidistantLagrange1D::TruncatedEquidistantLagrange1D().
|
inline |
|
inline |
|
inline |
|
inlineprotected |
evaluate the value of the polynom at x
References m_vCoeff.
|
friend |
|
private |
Referenced by degree(), derivative(), operator*=(), operator*=(), Polynomial1D(), set_coefficients(), and value().