Changeset 276c3f in git for factory/algext.cc
- Timestamp:
- Jul 5, 2011, 3:16:22 PM (12 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- e28e6d1742e673c091f48a99b5d6d522e5d5bfa2
- Parents:
- faf58fa448fff6919168c75277259dc4202064b0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/algext.cc
rfaf58f r276c3f 190 190 191 191 return 1; 192 }193 194 CanonicalForm reduce(const CanonicalForm & f, const CanonicalForm & M)195 { // polynomials in M.mvar() are considered coefficients196 // M univariate monic polynomial197 // the coefficients of f are reduced modulo M198 if(f.inBaseDomain() || f.level() < M.level())199 return f;200 if(f.level() == M.level())201 {202 if(f.degree() < M.degree())203 return f;204 CanonicalForm tmp = mod (f, M);205 return tmp;206 }207 // here: f.level() > M.level()208 CanonicalForm result = 0;209 for(CFIterator i=f; i.hasTerms(); i++)210 result += reduce(i.coeff(),M) * power(f.mvar(),i.exp());211 return result;212 192 } 213 193
Note: See TracChangeset
for help on using the changeset viewer.