lemon/polynomial.h
changeset 2199 1229af45cc69
parent 2086 3fc072264f77
child 2207 75a29ac69c19
equal deleted inserted replaced
0:aeb3f8ffac6b 1:ee0e4718afdc
   126 
   126 
   127     ///Integrate the polynomial (in place)
   127     ///Integrate the polynomial (in place)
   128     Polynomial &integrateMyself()
   128     Polynomial &integrateMyself()
   129     {
   129     {
   130       _coeff.push_back(T());
   130       _coeff.push_back(T());
   131       for(int i=_coeff.size()-1;i>=0;i--) _coeff[i]=_coeff[i-1]/i;
   131       for(int i=_coeff.size()-1;i>0;i--) _coeff[i]=_coeff[i-1]/i;
   132       _coeff[0]=0;
   132       _coeff[0]=0;
   133       return *this;
   133       return *this;
   134     }
   134     }
   135     
   135     
   136     ///Return the integrate of the polynomial
   136     ///Return the integrate of the polynomial