27 #ifndef MPBLOCKS_POLYNOMIAL_DIFFERENTIATE_H_
28 #define MPBLOCKS_POLYNOMIAL_DIFFERENTIATE_H_
32 namespace polynomial {
35 template <
typename Scalar,
class Exp1,
class Exp2>
44 for(
int i=0; i < out.
size(); i++)
48 for(
int i=2; i < in.
size(); i++)
52 for(
int j = i-n; j < i && j < out.
size(); j++)
74 #endif // DIFFERENTIATE_H_
expression template for rvalues
Size_t size() const
return the size for a vector
Size_t size() const
return the size for a vector
expression template for rvalues
void differentiate(const RValue< Scalar, Exp1 > &in, LValue< Scalar, Exp2 > &out, int n)
evaluate a polynomial