Changeset c1b9927 in git for factory/facFqBivar.cc
- Timestamp:
- Jun 7, 2011, 3:27:18 PM (13 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 639652f186091509059ccc76f18852db93c1b988
- Parents:
- 6e2ef0e6c1f75468f4ae12cfb9e5273eb4aa81c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facFqBivar.cc
r6e2ef0e rc1b9927 793 793 CanonicalForm gamma= info.getGamma(); 794 794 CanonicalForm delta= info.getDelta(); 795 int k= info.getGFDegree();796 795 bool extension= info.isInExtension(); 797 796 … … 900 899 { 901 900 if (!IsZero (M (i,j))) 902 nonZero++; 901 nonZero++; 903 902 } 904 903 if (nonZero != 1) … … 1018 1017 { 1019 1018 Variable y= Variable (2); 1020 Variable x= Variable (1); 1019 Variable x= Variable (1); 1021 1020 CanonicalForm yToL= power (y, liftBound); 1022 1021 for (long i= 1; i <= N.NumCols(); i++) … … 1219 1218 { 1220 1219 CFList source, dest; 1221 1220 1222 1221 if (!isInExtension (buf2, gamma, k, delta, source, dest)) 1223 1222 { … … 1292 1291 1293 1292 void 1294 extReconstructionTry (CFList& reconstructedFactors, CanonicalForm& F, const 1293 extReconstructionTry (CFList& reconstructedFactors, CanonicalForm& F, const 1295 1294 CFList& factors, const int liftBound, int& factorsFound, 1296 1295 int*& factorsFoundIndex, mat_zz_p& N, bool beenInThres, … … 1664 1663 ) 1665 1664 { 1666 bool GF= (CFFactory::gettype () == GaloisFieldDomain);1667 1665 CanonicalForm LCF= LC (F, 1); 1668 1666 CFArray *A= new CFArray [factors.length() - 1]; … … 1774 1772 ) 1775 1773 { 1776 bool GF= (CFFactory::gettype () == GaloisFieldDomain);1777 1774 CanonicalForm LCF= LC (F, 1); 1778 1775 CFArray *A= new CFArray [factors.length() - 1]; … … 1951 1948 if (isReduced (NTLN)) 1952 1949 { 1953 int d= degree (F) + 1;1954 1950 int * factorsFoundIndex= new int [NTLN.NumCols()]; 1955 1951 for (long i= 0; i < NTLN.NumCols(); i++) … … 2075 2071 if (isReduced (NTLN)) 2076 2072 { 2077 int d= degree (F) + 1;2078 2073 int * factorsFoundIndex= new int [NTLN.NumCols()]; 2079 2074 for (long i= 0; i < NTLN.NumCols(); i++) … … 2263 2258 if (isReduced (NTLN)) 2264 2259 { 2265 int d= degree (F) + 1;2266 2260 int * factorsFoundIndex= new int [NTLN.NumCols()]; 2267 2261 for (long i= 0; i < NTLN.NumCols(); i++) … … 2505 2499 if (isReduced (NTLN)) 2506 2500 { 2507 int d= degree (F) + 1;2508 2501 int * factorsFoundIndex= new int [NTLN.NumCols()]; 2509 2502 for (long i= 0; i < NTLN.NumCols(); i++) … … 2629 2622 if (degree (bufF) + 1 + degree (LC (bufF, 1)) < oldL && result.length() > 0) 2630 2623 { 2631 F= bufF; 2624 F= bufF; 2632 2625 factors= bufUniFactors; 2633 2626 delete [] A; … … 2725 2718 if (degree (bufF) + 1 + degree (LC (bufF, 1)) < l && result.length() > 0) 2726 2719 { 2727 F= bufF; 2720 F= bufF; 2728 2721 factors= bufUniFactors; 2729 2722 delete [] A; … … 2770 2763 CanonicalForm primElemAlpha= info.getGamma(); 2771 2764 CanonicalForm imPrimElemAlpha= info.getDelta(); 2772 bool reduced= false;2773 2765 if (NTLN.NumRows() != factors.length()) //refined factors 2774 2766 ident (NTLN, factors.length()); … … 2787 2779 imBasis= imBasis (power (y, degMipo), y); 2788 2780 imBasis= imBasis (y, gamma); 2789 int ind= oldL*degMipo - 1;2790 2781 CFIterator iter= imBasis; 2791 2782 for (; iter.hasTerms(); iter++) … … 2801 2792 { 2802 2793 for (int i= 0; i < factors.length(); i++, j++) 2803 A[i]= logarithmicDerivative (F, j.getItem(), oldL, oldL2, bufQ[i], 2794 A[i]= logarithmicDerivative (F, j.getItem(), oldL, oldL2, bufQ[i], 2804 2795 bufQ[i]); 2805 2796 } … … 2894 2885 if (degree (bufF) + 1 + degree (LC (bufF, 1)) < l && result.length() > 0) 2895 2886 { 2896 F= bufF; 2887 F= bufF; 2897 2888 factors= bufUniFactors; 2898 2889 return result; … … 3013 3004 if (degree (bufF) + 1 + degree (LC (bufF, 1)) < l && result.length() > 0) 3014 3005 { 3015 F= bufF; 3006 F= bufF; 3016 3007 factors= bufUniFactors; 3017 3008 delete [] A; … … 3320 3311 int stepSize= 8; 3321 3312 l += tmax (tmin (8, degree (F) + 1 + degree (LC (F, 1))-l),2); 3322 bool reduced= false;3323 3313 Variable gamma= info.getBeta(); 3324 3314 CanonicalForm primElemAlpha= info.getGamma(); … … 3512 3502 int stepSize= 8; //TODO choose better step size? 3513 3503 l += tmax (tmin (8, degree (F) + 1 + degree (LC (F, 1))-l), 2); 3514 bool reduced= false;3515 3504 if (NTLN.NumRows() != factors.length()) //refined factors 3516 3505 ident (NTLN, factors.length()); … … 3660 3649 Variable y= Variable (2); 3661 3650 CanonicalForm LCF= LC (F, 1); 3662 for (long i= 1; i <= NTLN.NumCols(); i++) 3651 for (long i= 1; i <= NTLN.NumCols(); i++) 3663 3652 { 3664 3653 CFListIterator iter= factors; … … 3889 3878 3890 3879 CFList 3891 sieveSmallFactors (const CanonicalForm& G, CFList& uniFactors, DegreePattern& 3880 sieveSmallFactors (const CanonicalForm& G, CFList& uniFactors, DegreePattern& 3892 3881 degPat, CanonicalForm& H, CFList& diophant, CFArray& Pi, 3893 3882 CFMatrix& M, bool& success, int d … … 3916 3905 } 3917 3906 int sizeOldF= size (F); 3918 int sizeF;3919 3907 CFList result; 3920 3908 CanonicalForm bufF= F; … … 3970 3958 CanonicalForm shiftedF= F (y - evaluation, y); 3971 3959 int sizeOldF= size (shiftedF); 3972 int sizeF;3973 3960 CFList result; 3974 3961 CanonicalForm bufF= shiftedF; … … 4120 4107 ident (NTLNe, bufUniFactors.length() - 1); 4121 4108 } 4122 bool wasInBounds= false;4123 4109 bool irreducible= false; 4124 4110 CFArray bufQ= CFArray (bufUniFactors.length() - 1); … … 4243 4229 if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp)) 4244 4230 { 4245 factorsFoundIndex= new int [NTLN.NumCols()]; 4231 factorsFoundIndex= new int [NTLN.NumCols()]; 4246 4232 for (long i= 0; i < NTLN.NumCols(); i++) 4247 4233 factorsFoundIndex[i]= 0; … … 4249 4235 else 4250 4236 { 4251 factorsFoundIndex= new int [NTLNe.NumCols()]; 4237 factorsFoundIndex= new int [NTLNe.NumCols()]; 4252 4238 for (long i= 0; i < NTLNe.NumCols(); i++) 4253 4239 factorsFoundIndex[i]= 0; … … 4293 4279 if (NTLN.NumCols() < bufUniFactors.length()) 4294 4280 { 4295 refineAndRestartLift (F, NTLN, liftBound, l, bufUniFactors, M, Pi, 4281 refineAndRestartLift (F, NTLN, liftBound, l, bufUniFactors, M, Pi, 4296 4282 diophant 4297 4283 ); … … 4482 4468 if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp)) 4483 4469 { 4484 if (result.length()== NTLN.NumCols()) 4470 if (result.length()== NTLN.NumCols()) 4485 4471 { 4486 4472 delete [] bounds; … … 4491 4477 else 4492 4478 { 4493 if (result.length()== NTLNe.NumCols()) 4479 if (result.length()== NTLNe.NumCols()) 4494 4480 { 4495 4481 delete [] bounds; … … 4524 4510 if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp)) 4525 4511 { 4526 if (result.length() == NTLN.NumCols()) 4512 if (result.length() == NTLN.NumCols()) 4527 4513 { 4528 4514 delete [] bounds; … … 4533 4519 else 4534 4520 { 4535 if (result.length() == NTLNe.NumCols()) 4521 if (result.length() == NTLNe.NumCols()) 4536 4522 { 4537 4523 delete [] bounds; … … 4640 4626 ) 4641 4627 { 4642 bool GF= (CFFactory::gettype()==GaloisFieldDomain);4643 4628 CanonicalForm evaluation= eval; 4644 4629 ExtensionInfo info= extInfo; … … 4766 4751 4767 4752 ident (NTLN, bufUniFactors.length() - 1); 4768 bool wasInBounds= false;4769 4753 bool irreducible= false; 4770 4754 CFArray bufQ= CFArray (bufUniFactors.length() - 1); … … 4841 4825 { 4842 4826 int * factorsFoundIndex; 4843 factorsFoundIndex= new int [NTLN.NumCols()]; 4827 factorsFoundIndex= new int [NTLN.NumCols()]; 4844 4828 for (long i= 0; i < NTLN.NumCols(); i++) 4845 4829 factorsFoundIndex[i]= 0; … … 4989 4973 ); 4990 4974 4991 if (result.length()== NTLN.NumCols()) 4975 if (result.length()== NTLN.NumCols()) 4992 4976 { 4993 4977 delete [] bounds; … … 5004 4988 dest 5005 4989 ); 5006 if (result.length()== NTLN.NumCols()) 4990 if (result.length()== NTLN.NumCols()) 5007 4991 { 5008 4992 delete [] bounds; … … 5415 5399 CFList earlyFactors; 5416 5400 TIMING_START (fac_hensel_lift); 5417 uniFactors= henselLiftAndEarly 5401 uniFactors= henselLiftAndEarly 5418 5402 (A, earlySuccess, earlyFactors, degs, liftBound, 5419 5403 uniFactors, info, evaluation);
Note: See TracChangeset
for help on using the changeset viewer.