Changeset 03c742 in git for factory/facFqBivar.cc
- Timestamp:
- Jun 26, 2020, 6:03:59 PM (4 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- f87a54f01779194a0163ca39873f5b4255a4f510
- Parents:
- b666c768103c724ed3617954c684de0e621144d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facFqBivar.cc
rb666c7 r03c742 39 39 #ifdef HAVE_NTL 40 40 #include "NTLconvert.h" 41 #endif 41 42 42 43 #ifdef HAVE_FLINT … … 79 80 } 80 81 82 #if defined(HAVE_NTL) || defined(HAVE_FLINT) 81 83 CanonicalForm evalPoint (const CanonicalForm& F, CanonicalForm & eval, 82 84 const Variable& alpha, CFList& list, const bool& GF, … … 170 172 Variable beta= rootOf (mipo.mapinto()); 171 173 CanonicalForm buf= GF2FalphaRep (A, beta); 174 #ifdef HAVE_NTL 172 175 if (getCharacteristic() > 2) 176 #else 177 if (getCharacteristic() > 0) 178 #endif 173 179 { 174 180 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400) … … 215 221 #endif 216 222 } 223 #ifdef HAVE_NTL 217 224 else 218 225 { … … 226 233 x, beta); 227 234 } 235 #endif 228 236 setCharacteristic (getCharacteristic(), k, cGFName); 229 237 for (CFFListIterator i= factorsA; i.hasItem(); i++) … … 237 245 else if (alpha.level() != 1) 238 246 { 247 #ifdef HAVE_NTL 239 248 if (getCharacteristic() > 2) 249 #else 250 if (getCharacteristic() > 0) 251 #endif 240 252 { 241 253 #if (HAVE_FLINT && __FLINT_RELEASE >= 20400) … … 282 294 #endif 283 295 } 296 #ifdef HAVE_NTL 284 297 else 285 298 { … … 293 306 x, alpha); 294 307 } 308 #endif 295 309 } 296 310 else 297 311 { 298 312 #ifdef HAVE_FLINT 313 #ifdef HAVE_NTL 299 314 if (degree (A) < 300) 315 #endif 300 316 { 301 317 nmod_poly_t FLINTA; … … 310 326 nmod_poly_clear (FLINTA); 311 327 } 328 #ifdef HAVE_NTL 312 329 else 313 330 #endif 331 #endif /* HAVE_FLINT */ 332 #ifdef HAVE_NTL 314 333 if (getCharacteristic() > 2) 315 334 { … … 334 353 x); 335 354 } 355 #endif 336 356 } 337 357 CFList uniFactors; … … 780 800 Variable chooseExtension (const Variable & alpha, const Variable& beta, int k) 781 801 { 802 #if 0//#ifdef HAVE_NTL 782 803 if (fac_NTL_char != getCharacteristic()) 783 804 { … … 786 807 } 787 808 zz_pX NTLIrredpoly; 809 #elif defined(HAVE_FLINT) 810 nmod_poly_t Irredpoly; 811 nmod_poly_init(Irredpoly,getCharacteristic()); 812 #endif 788 813 int i=1, m= 2; 789 814 // extension of F_p needed … … 808 833 i= degree (getMipo (alpha))/m + 1; 809 834 } 835 #if 0 //#ifdef HAVE_NTL 810 836 BuildIrred (NTLIrredpoly, i*m); 811 837 CanonicalForm newMipo= convertNTLzzpX2CF (NTLIrredpoly, Variable (1)); 838 #elif defined(HAVE_FLINT) 839 nmod_poly_randtest_monic_irreducible(Irredpoly,FLINTrandom,i*m+1); 840 CanonicalForm newMipo= convertnmod_poly_t2FacCF(Irredpoly,Variable (1)); 841 #endif 812 842 return rootOf (newMipo); 813 843 } … … 1112 1142 } 1113 1143 1144 #ifdef HAVE_NTL // henselLift12 1114 1145 CFList 1115 1146 henselLiftAndEarly (CanonicalForm& A, bool& earlySuccess, CFList& … … 1412 1443 return bufUniFactors; 1413 1444 } 1414 1445 #endif 1446 1447 #ifdef HAVE_NTL // henselLiftAndEarly 1415 1448 CFList 1416 1449 henselLiftAndEarly (CanonicalForm& A, bool& earlySuccess, CFList& … … 1424 1457 uniFactors, info, eval, dummy, den); 1425 1458 } 1459 #endif 1426 1460 1427 1461 #ifndef HAVE_FLINT … … 1462 1496 } 1463 1497 #endif 1464 1498 1499 #ifdef HAVE_NTL // mat_zz_pE 1465 1500 long isReduced (const mat_zz_pE& M) 1466 1501 { … … 1479 1514 return 1; 1480 1515 } 1516 #endif 1481 1517 1482 1518 #ifndef HAVE_FLINT … … 1532 1568 #endif 1533 1569 1570 #ifdef HAVE_NTL // mat_zz_pE 1534 1571 int * extractZeroOneVecs (const mat_zz_pE& M) 1535 1572 { … … 1555 1592 return result; 1556 1593 } 1557 1594 #endif 1595 1596 #ifdef HAVE_NTL // mat_zz_pE 1558 1597 void 1559 1598 reconstructionTry (CFList& reconstructedFactors, CanonicalForm& F, const CFList& … … 1637 1676 F= bufF (y+eval,y); 1638 1677 } 1678 #endif 1639 1679 1640 1680 #ifndef HAVE_FLINT … … 1806 1846 #endif 1807 1847 1848 #ifdef HAVE_NTL //mat_zz_pE 1808 1849 CFList 1809 1850 reconstruction (CanonicalForm& G, CFList& factors, int* zeroOneVecs, int … … 1854 1895 return result; 1855 1896 } 1856 1897 #endif 1898 1899 #ifdef HAVE_NTL // mat_zz_pE 1857 1900 CFList 1858 1901 monicReconstruction (CanonicalForm& G, CFList& factors, int* zeroOneVecs, … … 1905 1948 return result; 1906 1949 } 1950 #endif 1907 1951 1908 1952 #ifndef HAVE_FLINT … … 2431 2475 2432 2476 #ifndef HAVE_FLINT 2477 #ifdef HAVE_NTL // logarithmicDerivative 2433 2478 //over Fp 2434 2479 int … … 2554 2599 } 2555 2600 #endif 2556 2557 #ifdef HAVE_FLINT 2601 #endif 2602 2603 #ifdef HAVE_FLINT 2604 #ifdef HAVE_NTL // henselLift12 2558 2605 int 2559 2606 liftAndComputeLattice (const CanonicalForm& F, int* bounds, int sizeBounds, int … … 2691 2738 } 2692 2739 #endif 2740 #endif 2693 2741 2694 2742 #ifndef HAVE_FLINT 2743 #ifdef HAVE_NTL //logarithmicDerivative 2695 2744 //over field extension 2696 2745 int … … 2889 2938 } 2890 2939 #endif 2891 2892 #ifdef HAVE_FLINT 2940 #endif 2941 2942 #ifdef HAVE_FLINT 2943 #ifdef HAVE_NTL // henselLift12 2893 2944 //over field extension 2894 2945 int … … 3097 3148 } 3098 3149 #endif 3150 #endif 3099 3151 3100 3152 // over Fq 3153 #ifdef HAVE_NTL 3101 3154 int 3102 3155 liftAndComputeLattice (const CanonicalForm& F, int* bounds, int sizeBounds, … … 3230 3283 return l; 3231 3284 } 3232 3285 #endif 3286 3287 #ifdef HAVE_NTL // henselLift12 3233 3288 #ifdef HAVE_FLINT 3234 3289 int … … 3412 3467 return l; 3413 3468 } 3414 3469 #endif 3470 3471 #ifdef HAVE_NTL // logarithmicDerivative 3415 3472 CFList 3416 3473 increasePrecision (CanonicalForm& F, CFList& factors, int factorsFound, … … 3619 3676 return CFList(); 3620 3677 } 3621 3678 #endif 3679 3680 #ifdef HAVE_NTL // mat_zz_pE 3622 3681 CFList 3623 3682 increasePrecision (CanonicalForm& F, CFList& factors, int factorsFound, … … 3758 3817 return CFList(); 3759 3818 } 3760 3819 #endif 3820 3821 #ifdef HAVE_NTL // logarithmicDerivative 3761 3822 //over field extension 3762 3823 CFList … … 4065 4126 return CFList(); 4066 4127 } 4067 4128 #endif 4129 4130 #ifdef HAVE_NTL // mat_zz_pE 4068 4131 CFList 4069 4132 increasePrecision2 (const CanonicalForm& F, CFList& factors, … … 4196 4259 return CFList(); 4197 4260 } 4198 4261 #endif 4262 4263 #ifdef HAVE_NTL // logarithmicDerivative 4199 4264 CFList 4200 4265 increasePrecisionFq2Fp (CanonicalForm& F, CFList& factors, int factorsFound, … … 4404 4469 return CFList(); 4405 4470 } 4406 4471 #endif 4472 4473 #ifdef HAVE_NTL // logarithmicDerivative 4407 4474 #ifdef HAVE_FLINT 4408 4475 CFList … … 4572 4639 return result; 4573 4640 } 4574 4641 #endif 4642 4643 #ifdef HAVE_NTL // mat_zz_pE 4575 4644 CFList 4576 4645 increasePrecision (CanonicalForm& F, CFList& factors, int oldL, int … … 4677 4746 return result; 4678 4747 } 4748 #endif 4679 4749 4680 4750 //over field extension 4751 #ifdef HAVE_NTL // logarithmicDerivative 4681 4752 #ifdef HAVE_FLINT 4682 4753 CFList … … 4934 5005 return result; 4935 5006 } 4936 5007 #endif 5008 5009 #ifdef HAVE_NTL // logarithmicDerivative 4937 5010 #ifdef HAVE_FLINT 4938 5011 CFList … … 5092 5165 return result; 5093 5166 } 5094 5167 #endif 5168 5169 #ifdef HAVE_NTL // logarithmicDerivative 5095 5170 #ifdef HAVE_FLINT 5096 5171 CFList … … 5325 5400 return CFList(); 5326 5401 } 5402 #endif 5327 5403 5328 5404 //Fq 5405 #ifdef HAVE_NTL 5329 5406 CFList 5330 5407 furtherLiftingAndIncreasePrecision (CanonicalForm& F, CFList& … … 5470 5547 return CFList(); 5471 5548 } 5549 #endif 5472 5550 5473 5551 //over field extension 5552 #ifdef HAVE_NTL // logarithmicDerivative 5474 5553 #ifdef HAVE_FLINT 5475 5554 CFList … … 5785 5864 return CFList(); 5786 5865 } 5787 5866 #endif 5867 5868 #ifdef HAVE_NTL // logarithmicDerivative 5788 5869 #ifdef HAVE_FLINT 5789 5870 CFList … … 6018 6099 return CFList(); 6019 6100 } 6101 #endif 6020 6102 6021 6103 #ifndef HAVE_FLINT … … 6052 6134 6053 6135 #ifdef HAVE_FLINT 6136 #ifdef HAVE_NTL // henselLift12 6054 6137 void 6055 6138 refineAndRestartLift (const CanonicalForm& F, const nmod_mat_t FLINTN, int … … 6082 6165 } 6083 6166 #endif 6084 6167 #endif 6168 6169 #ifdef HAVE_NTL // mat_zz_pE 6085 6170 void 6086 6171 refineAndRestartLift (const CanonicalForm& F, const mat_zz_pE& NTLN, int … … 6112 6197 henselLift12 (F, factors, l, Pi, diophant, M); 6113 6198 } 6199 #endif 6114 6200 6115 6201 #ifdef HAVE_FLINT … … 6327 6413 } 6328 6414 6415 #ifdef HAVE_NTL // mat_zz_pE 6329 6416 CFList 6330 6417 earlyReconstructionAndLifting (const CanonicalForm& F, const mat_zz_pE& N, … … 6483 6570 return result; 6484 6571 } 6572 #endif 6485 6573 6486 6574 //over field extension … … 6668 6756 } 6669 6757 6758 #ifdef HAVE_NTL // henselLift12 6670 6759 CFList 6671 6760 sieveSmallFactors (const CanonicalForm& G, CFList& uniFactors, DegreePattern& … … 6712 6801 } 6713 6802 } 6714 6803 #endif 6804 6805 #ifdef HAVE_NTL // henselLift12 6715 6806 CFList 6716 6807 extSieveSmallFactors (const CanonicalForm& G, CFList& uniFactors, DegreePattern& … … 6760 6851 } 6761 6852 } 6762 6853 #endif 6854 6855 #ifdef HAVE_NTL // matrix Fq 6763 6856 CFList 6764 6857 henselLiftAndLatticeRecombi (const CanonicalForm& G, const CFList& uniFactors, … … 7556 7649 } 7557 7650 } 7558 7651 #endif 7652 7653 #ifdef HAVE_NTL //primitiveElement 7559 7654 ExtensionInfo 7560 7655 init4ext (const ExtensionInfo& info, const CanonicalForm& evaluation, … … 7609 7704 return info2; 7610 7705 } 7611 7706 #endif 7707 7708 #ifdef HAVE_NTL // init4ext 7612 7709 CFList 7613 7710 extHenselLiftAndLatticeRecombi(const CanonicalForm& G, const CFList& uniFactors, … … 8193 8290 } 8194 8291 } 8195 8292 #endif 8293 8294 #ifdef HAVE_NTL // henselLiftAndLatticeRecombi 8196 8295 CFList 8197 8296 extBiFactorize (const CanonicalForm& F, const ExtensionInfo& info); … … 8821 8920 return factors; 8822 8921 } 8823 8922 #endif 8923 8924 #ifdef HAVE_NTL // primitiveElement 8824 8925 CFList 8825 8926 extBiFactorize (const CanonicalForm& F, const ExtensionInfo& info) … … 8995 9096 } 8996 9097 } 8997 8998 #endif 8999 /* HAVE_NTL */ 9000 9001 9098 #endif 9099 #endif
Note: See TracChangeset
for help on using the changeset viewer.