27 #ifndef MPBLOCKS_POLYNOMIAL_QUOTIENT_H_
28 #define MPBLOCKS_POLYNOMIAL_QUOTIENT_H_
31 namespace polynomial {
34 template <
typename Scalar,
class Exp1,
class Exp2>
48 Quotient( Exp1
const& numerator, Exp2
const& denominator ):
51 m_q.
resize(numerator.size()-denominator.size()+1);
54 for(
int size = numerator.size();
55 size > 0 && size >= denominator.size(); )
58 int n = size - denominator.size();
62 denominator[denominator.size()-1];
89 template <
typename Scalar,
class Exp1,
class Exp2>
96 static_cast<Exp1 const&>(A),
97 static_cast<Exp2 const&>(B));
110 #endif // QUOTIENT_H_
Size_t size() const
return the size for a vector
expression template for sum of two matrix expressions
LValue< Scalar, Exp > & lvalue(LValue< Scalar, Exp > &exp)
expression template for rvalues
Polynomial< Scalar, Dynamic > Quotient_t
Polynomial< Scalar, Dynamic > Remainder_t
A dense, dynamically sized polynomial.
Quotient< Scalar, Exp1, Exp2 > operator/(RValue< Scalar, Exp1 > const &A, RValue< Scalar, Exp2 > const &B)
RValue< Scalar, Polynomial< Scalar, Dynamic > > & r()
RValue< Scalar, Polynomial< Scalar, Dynamic > > & q()
Quotient(Exp1 const &numerator, Exp2 const &denominator)