27 #ifndef MPBLOCKS_POLYNOMIAL_DIFFERENCE_H_
28 #define MPBLOCKS_POLYNOMIAL_DIFFERENCE_H_
31 namespace polynomial {
34 template <
typename Scalar,
class Exp1,
class Exp2>
38 Difference<Scalar,Exp1,Exp2> >
61 if( i <
m_A.size() && i <
m_B.size() )
63 else if( i <
m_A.size() )
65 else if( i <
m_B.size() )
73 return m_A.eval(x) +
m_B.eval(x);
80 template <
typename Scalar,
class Exp1,
class Exp2>
87 static_cast<Exp1 const&>(A),
88 static_cast<Exp2 const&>(B));
101 #endif // DIFFERENCE_H_
Difference< Scalar, Exp1, Exp2 > operator-(RValue< Scalar, Exp1 > const &A, RValue< Scalar, Exp2 > const &B)
Difference(Exp1 const &A, Exp2 const &B)
Scalar operator[](Size_t i) const
return the evaluated i'th element of a vector expression
Size_t size() const
return the size for a vector
expression template for sum of two matrix expressions
expression template for rvalues