Changeset 4553b1 in git for factory/facAbsFact.h
- Timestamp:
- Apr 19, 2013, 3:56:48 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 809d634e3370e14c61f7b1ee234231400c570c0f
- Parents:
- f7ed7dc2ce876bee21478ae1bf88e2734992bcd8
- git-author:
- Martin Lee <martinlee84@web.de>2013-04-19 15:56:48+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2013-05-02 11:42:39+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facAbsFact.h
rf7ed7d r4553b1 37 37 CFFListIterator i= rationalFactors; 38 38 i++; 39 CanonicalForm mipo;39 Variable alpha; 40 40 CFAFList result; 41 CFFList QaFactors; 42 CFFListIterator iter; 41 43 for (; i.hasItem(); i++) 42 44 { 43 mipo= rootOf (i.getItem().factor()); 44 result.append (CFAFactor (i.getItem().factor(), mipo, i.getItem().exp())); 45 if (degree (i.getItem().factor()) == 1) 46 { 47 alpha= rootOf (Variable (1)); 48 result.append (CFAFactor (i.getItem().factor(), getMipo (alpha), 49 i.getItem().exp())); 50 continue; 51 } 52 alpha= rootOf (i.getItem().factor()); 53 QaFactors= factorize (i.getItem().factor(), alpha); 54 iter= QaFactors; 55 if (iter.getItem().factor().inCoeffDomain()) 56 iter++; 57 for (;iter.hasItem(); iter++) 58 { 59 if (degree (iter.getItem().factor()) == 1) 60 { 61 result.append (CFAFactor (iter.getItem().factor(), getMipo (alpha), 62 i.getItem().exp())); 63 break; 64 } 65 } 45 66 } 46 67 result.insert (CFAFactor (rationalFactors.getFirst().factor(), 1, 1)); … … 58 79 //TODO handle homogeneous input 59 80 ASSERT (getNumVars (F) == 2, "expected bivariate input"); 60 ASSERT (getCharacteristic() == 0 && isOn (SW_RATIONAL), "expected poly over Q"); 81 ASSERT (getCharacteristic() == 0 && isOn (SW_RATIONAL), 82 "expected poly over Q"); 61 83 62 84 CFMap N; … … 64 86 bool isRat= isOn (SW_RATIONAL); 65 87 if (isRat) 66 {67 88 F *= bCommonDen (F); 68 Off (SW_RATIONAL); 69 }89 90 Off (SW_RATIONAL); 70 91 F /= icontent (F); 71 92 if (isRat) … … 112 133 } 113 134 114 115 135 for (CFAFListIterator i= result; i.hasItem(); i++) 116 136 i.getItem()= CFAFactor (N (i.getItem().factor()), i.getItem().minpoly(), … … 124 144 normalize (result); 125 145 result.insert (CFAFactor (Lc(G), 1, 1)); 146 126 147 return result; 127 148 }
Note: See TracChangeset
for help on using the changeset viewer.