27 #ifndef MPBLOCKS_POLYNOMIAL_PRODUCT_H_
28 #define MPBLOCKS_POLYNOMIAL_PRODUCT_H_
31 namespace polynomial {
34 template <
typename Scalar,
class Exp1,
class Exp2>
38 Product<Scalar,Exp1,Exp2> >
55 return m_A.size() +
m_B.size() - 1;
62 for(
int i=0; i <= n; i++)
65 if( i <
m_A.size() && j <
m_B.size() )
74 return m_A.eval(x) *
m_B.eval(x);
81 template <
typename Scalar,
class Exp1,
class Exp2>
88 static_cast<Exp1 const&>(A),
89 static_cast<Exp2 const&>(B));
Scalar operator[](Size_t n) const
return the evaluated i'th element of a vector expression
Size_t size() const
return the size for a vector
expression template for rvalues
Product< Scalar, Exp1, Exp2 > operator*(RValue< Scalar, Exp1 > const &A, RValue< Scalar, Exp2 > const &B)
Product(Exp1 const &A, Exp2 const &B)
expression template for sum of two matrix expressions