ug4
|
#include <polynomial1d.h>
Public Member Functions | |
size_t | degree () const |
Polynomial1D | derivative () const |
returns the derivative of this polynomial as a polynomial More... | |
Polynomial1D & | operator*= (const Polynomial1D &v) |
multiply by a polynomial More... | |
Polynomial1D & | operator*= (number scale) |
multiply by a scalar More... | |
Polynomial1D (const std::vector< number > &a) | |
Constructor passing coefficients for the polynomial. More... | |
Polynomial1D (size_t degree=0) | |
Constructor producing zero polynomial of degree 'degree'. More... | |
number | value (const number x) const |
evaluate the value of the polynom at x More... | |
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'.
Referenced by derivative().
|
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*=(), ug::EquidistantLagrange1D::position(), ug::TruncatedEquidistantLagrange1D::position(), ug::BoundedEquidistantLagrange1D::position(), and ug::TruncatedEquidistantLagrange1D::TruncatedEquidistantLagrange1D().
|
inline |
returns the derivative of this polynomial as a polynomial
References degree(), m_vCoeff, and Polynomial1D().
|
inline |
|
inline |
|
inlineprotected |
evaluate the value of the polynom at x
References m_vCoeff.
|
friend |
|
private |
Referenced by degree(), derivative(), operator*=(), Polynomial1D(), set_coefficients(), and value().