Changeset 8d2c11 in git for factory/facFqFactorizeUtil.cc
- Timestamp:
- Aug 15, 2012, 2:51:29 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '2234726c50d679d6664181a5c72f75a6fd64a787')
- Children:
- 8e452c99a50a0aeb91c8380f01737ee90a2a1559
- Parents:
- fcd296b05a4f13666514ab7df4a8227fe930b65f
- git-author:
- Martin Lee <martinlee84@web.de>2012-08-15 14:51:29+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2012-09-04 18:01:17+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facFqFactorizeUtil.cc
rfcd296 r8d2c11 162 162 } 163 163 164 /// like getVars but including multiplicities 165 CanonicalForm myGetVars (const CanonicalForm& F) 166 { 167 CanonicalForm result= 1; 168 int deg; 169 for (int i= 1; i <= F.level(); i++) 170 { 171 if ((deg= degree (F, i)) > 0) 172 result *= power (Variable (i), deg); 173 } 174 return result; 175 } 164 176 177 int compareByNumberOfVars (const CFFactor& F, const CFFactor& G) 178 { 179 return getNumVars (F.factor()) < getNumVars (G.factor()); 180 } 181 182 CFFList 183 sortCFFListByNumOfVars (CFFList& F) 184 { 185 F.sort (compareByNumberOfVars); 186 CFFList result= F; 187 return result; 188 } 189 190
Note: See TracChangeset
for help on using the changeset viewer.