Changeset 0851b0 in git for factory/facAlgExt.cc
- Timestamp:
- Oct 12, 2012, 5:31:21 PM (11 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- cb4f0c3c5277d6de4d18c968650b4169ff1d1b46
- Parents:
- 2a95b234ef67ebbc98057baefb8dd2ed43af3762
- git-author:
- Martin Lee <martinlee84@web.de>2012-10-12 17:31:21+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2012-10-24 12:26:22+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facAlgExt.cc
r2a95b2 r0851b0 29 29 #include "fac_sqrfree.h" 30 30 31 TIMING_DEFINE_PRINT(fac_alg_resultant) 32 TIMING_DEFINE_PRINT(fac_alg_norm) 33 TIMING_DEFINE_PRINT(fac_alg_factor_norm) 34 TIMING_DEFINE_PRINT(fac_alg_gcd) 35 TIMING_DEFINE_PRINT(fac_alg_sqrf) 36 TIMING_DEFINE_PRINT(fac_alg_factor_sqrf) 37 31 38 // squarefree part of F 32 39 CanonicalForm … … 53 60 int degmipo= degree (mipo); 54 61 CanonicalForm norm; 62 TIMING_START (fac_alg_resultant); 55 63 if (degg >= 8 || degmipo >= 8) 56 64 norm= resultantZ (g, mipo, x); 57 65 else 58 66 norm= resultant (g, mipo, x); 67 TIMING_END_AND_PRINT (fac_alg_resultant, "time to compute resultant0: "); 59 68 60 69 i= 0; … … 72 81 g= F (y - i*alpha, y); 73 82 g *= bCommonDen (g); 83 TIMING_START (fac_alg_resultant); 74 84 if (degg >= 8 || degmipo >= 8) 75 85 norm= resultantZ (g (x, alpha), mipo, x); 76 86 else 77 87 norm= resultant (g (x, alpha), mipo, x); 88 TIMING_END_AND_PRINT (fac_alg_resultant,"time to compute resultant1: "); 78 89 } 79 90 else … … 81 92 g= F (y + i*alpha, y); 82 93 g *= bCommonDen (g); 94 TIMING_START (fac_alg_resultant); 83 95 if (degg >= 8 || degmipo >= 8) 84 96 norm= resultantZ (g (x, alpha), mipo, x); 85 97 else 86 98 norm= resultant (g (x, alpha), mipo, x); 99 TIMING_END_AND_PRINT (fac_alg_resultant,"time to compute resultant2: "); 87 100 } 88 101 if (degree (gcd (deriv (norm, y), norm)) <= 0) … … 108 121 CanonicalForm f= F*bCommonDen (F); 109 122 int shift; 123 TIMING_START (fac_alg_norm); 110 124 CanonicalForm norm= sqrfNorm (f, alpha, shift); 125 TIMING_END_AND_PRINT (fac_alg_norm, "time to compute sqrf norm: "); 111 126 ASSERT (degree (norm, alpha) <= 0, "wrong norm computed"); 127 TIMING_START (fac_alg_factor_norm); 112 128 CFFList normFactors= factorize (norm); 129 TIMING_END_AND_PRINT (fac_alg_factor_norm, "time to factor norm: "); 113 130 CFList factors; 114 131 if (normFactors.length() <= 2) … … 125 142 { 126 143 ASSERT (i.getItem().exp() == 1, "norm not squarefree"); 144 TIMING_START (fac_alg_gcd); 127 145 if (shift == 0) 128 146 factor= gcd (buf, i.getItem().factor()); … … 130 148 factor= gcd (buf, i.getItem().factor() (f.mvar() + shift*alpha, f.mvar())); 131 149 buf /= factor; 150 TIMING_END_AND_PRINT (fac_alg_gcd, "time to recover factors: "); 132 151 factors.append (factor); 133 152 } … … 149 168 bool save_rat=!isOn (SW_RATIONAL); 150 169 On (SW_RATIONAL); 170 TIMING_START (fac_alg_sqrf); 151 171 CFFList sqrf= sqrFreeZ (F); 172 TIMING_END_AND_PRINT (fac_alg_sqrf, "time for sqrf factors in Q(a)[x]: "); 152 173 CFList factorsSqrf; 153 174 CFFList factors; … … 158 179 { 159 180 if (i.getItem().factor().inCoeffDomain()) continue; 181 TIMING_START (fac_alg_factor_sqrf); 160 182 factorsSqrf= AlgExtSqrfFactorize (i.getItem().factor(), alpha); 183 TIMING_END_AND_PRINT (fac_alg_factor_sqrf, 184 "time to factor sqrf factors in Q(a)[x]: "); 161 185 for (j= factorsSqrf; j.hasItem(); j++) 162 186 {
Note: See TracChangeset
for help on using the changeset viewer.