10 #ifndef TEUCHOS_POLYNOMIAL_DECL_HPP
11 #define TEUCHOS_POLYNOMIAL_DECL_HPP
13 #include "Teuchos_Describable.hpp"
15 #include "Teuchos_PolynomialTraits.hpp"
36 template <
typename CoeffT>
53 Polynomial(
unsigned int deg,
const CoeffT& cloneCoeff,
54 unsigned int reserve = 0);
64 Polynomial(
unsigned int deg,
unsigned int reserve = 0);
106 CoeffT* x, CoeffT* xdot = NULL)
const;
128 std::vector< Teuchos::RCP<CoeffT> >
coeff;
134 #endif // TEUCHOS_POLYNOMIAL_DECL_HPP
Teuchos::PolynomialTraits< coeff_type >::scalar_type scalar_type
Typename of scalars.
void setDegree(unsigned int deg)
Set degree of polynomial to deg.
unsigned int sz
Size of polynomial (may be > d)
Polynomial(unsigned int deg, const CoeffT &cloneCoeff, unsigned int reserve=0)
Create a polynomial of degree deg.
CoeffT coeff_type
Typename of coefficients.
void setCoefficient(unsigned int i, const CoeffT &v)
Set coefficient i to c.
void setCoefficientPtr(unsigned int i, const Teuchos::RCP< CoeffT > &c_ptr)
Set pointer for coefficient i to c_ptr. DANGEROUS!
Scalar scalar_type
Typename of scalars.
Lightweight container class to represent a simple polynomial.
Teuchos::RCP< CoeffT > getCoefficient(unsigned int i)
Return ref-count pointer to coefficient i.
std::vector< Teuchos::RCP< CoeffT > > coeff
Vector of polynomial coefficients.
Base class for all objects that can describe themselves.
Smart reference counting pointer class for automatic garbage collection.
void evaluate(typename Teuchos::Polynomial< CoeffT >::scalar_type &t, CoeffT *x, CoeffT *xdot=NULL) const
Evaluate polynomial and possibly its derivative at time t.
unsigned int degree() const
Return degree of polynomial.
unsigned int d
Degree of polynomial.
Reference-counted pointer class and non-member templated function implementations.