33 #ifndef __H__UG__LIB_DISC__LOCAL_SHAPE_FUNCTION_SET__COMMON__POLYNOMIAL1D__
34 #define __H__UG__LIB_DISC__LOCAL_SHAPE_FUNCTION_SET__COMMON__POLYNOMIAL1D__
78 const size_t deg =
m_vCoeff.size() - 1;
82 for(
size_t i = deg; i > 0; --i)
100 for(
size_t i = 0; i <= tmpPol.
degree(); ++i)
114 std::vector<number> vNewCoeff(newDeg+1, 0.0);
117 for(
size_t i = 0; i <=
degree(); ++i)
118 for(
size_t j = 0; j <= v.
degree(); ++j)
132 for(
size_t i = 0; i <=
degree(); ++i)
162 for(
size_t i = 0; i <= v.
degree(); ++i)
164 outStream << v.
m_vCoeff[i] <<
" *x^" << i;
165 if(i != v.
degree()) outStream <<
" + ";
Definition: polynomial1d.h:51
size_t degree() const
Definition: polynomial1d.h:72
Polynomial1D & operator*=(const Polynomial1D &v)
multiply by a polynomial
Definition: polynomial1d.h:108
Polynomial1D(size_t degree=0)
Constructor producing zero polynomial of degree 'degree'.
Definition: polynomial1d.h:54
friend std::ostream & operator<<(std::ostream &outStream, Polynomial1D &v)
Definition: polynomial1d.h:160
std::vector< number > m_vCoeff
Definition: polynomial1d.h:151
Polynomial1D derivative() const
returns the derivative of this polynomial as a polynomial
Definition: polynomial1d.h:90
Polynomial1D(const std::vector< number > &a)
Constructor passing coefficients for the polynomial.
Definition: polynomial1d.h:59
void set_coefficients(const std::vector< number > &a)
Definition: polynomial1d.h:143
number value(const number x) const
evaluate the value of the polynom at x
Definition: polynomial1d.h:75
std::ostream & operator<<(std::ostream &outStream, const ug::MathMatrix< 2, 2 > &m)
Definition: math_matrix.cpp:38
double number
Definition: types.h:124