Changeset 803956 in git for factory/facFqSquarefree.cc
- Timestamp:
- Apr 7, 2013, 2:20:04 AM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 919cae9250ad682976bdd4a2ecfe501d48b672dd
- Parents:
- 52cccfd3872fe7f123040534ad2fdbde32e83b75
- git-author:
- Martin Lee <martinlee84@web.de>2013-04-07 02:20:04+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2013-04-08 14:42:32+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facFqSquarefree.cc
r52cccfd r803956 24 24 #include "facFqSquarefree.h" 25 25 26 #ifdef HAVE_NTL 27 #include "NTLconvert.h" 28 #endif 29 26 30 static inline 27 31 CanonicalForm … … 43 47 } 44 48 } 49 50 #ifdef HAVE_NTL 51 CanonicalForm 52 pthRoot (const CanonicalForm & F, const ZZ& q, const Variable& alpha) 53 { 54 CanonicalForm A= F; 55 int p= getCharacteristic (); 56 if (A.inCoeffDomain()) 57 { 58 zz_p::init (p); 59 zz_pX NTLMipo= convertFacCF2NTLzzpX (getMipo (alpha)); 60 zz_pE::init (NTLMipo); 61 zz_pX NTLA= convertFacCF2NTLzzpX (A); 62 zz_pE NTLA2= to_zz_pE (NTLA); 63 power (NTLA2, NTLA2, q/p); 64 A= convertNTLzzpE2CF (NTLA2, alpha); 65 return A; 66 } 67 else 68 { 69 CanonicalForm buf= 0; 70 for (CFIterator i= A; i.hasTerms(); i++) 71 buf= buf + power(A.mvar(), i.exp()/p)*pthRoot (i.coeff(), q, alpha); 72 return buf; 73 } 74 } 75 #endif 45 76 46 77 CanonicalForm … … 157 188 return CFFList (CFFactor (F/Lc(F), 1)); 158 189 159 CanonicalForm buffer= pthRoot (A, ipower (p, k)); 190 CanonicalForm buffer; 191 #ifdef HAVE_NTL 192 if (alpha.level() == 1) 193 #endif 194 buffer= pthRoot (A, ipower (p, k)); 195 #ifdef HAVE_NTL 196 else 197 { 198 ZZ q; 199 power (q, p, k); 200 buffer= pthRoot (A, q, alpha); 201 } 202 #endif 160 203 161 204 tmp1= squarefreeFactorization (buffer, alpha);
Note: See TracChangeset
for help on using the changeset viewer.