Changeset 69c882 in git
- Timestamp:
- Feb 1, 2012, 5:19:00 PM (11 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- fdae2dc8d40153cbd857c71de2961e22d3f0a252
- Parents:
- 1a3011e587832b2682cb4978c6d117754eaa2572
- git-author:
- Martin Lee <martinlee84@web.de>2012-02-01 17:19:00+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-10 14:16:44+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facFqBivar.cc
r1a3011e r69c882 651 651 LCBuf= LC (buf, x); 652 652 T= Difference (T, CFList (i.getItem())); 653 F= buf; 653 654 654 655 // compute new possible degree pattern … … 667 668 if (adaptedLiftBound < deg) 668 669 { 670 degs= bufDegs1; 669 671 success= true; 670 factors= T;671 degs= bufDegs1;672 F= buf;673 672 } 674 673 if (bufDegs1.getLength() <= 1) … … 743 742 { 744 743 T= Difference (T, CFList (i.getItem())); 744 F= buf; 745 745 746 746 // compute new possible degree pattern … … 763 763 if (adaptedLiftBound < deg) 764 764 { 765 degs= bufDegs1; 765 766 success= true; 766 factors= T;767 degs= bufDegs1;768 F= buf;769 767 } 770 768 if (bufDegs1.getLength() <= 1) … … 828 826 829 827 void 830 deleteFactors (const CFList& L, CFList& factors, const CanonicalForm& eval, bool 831 extension) 828 deleteFactors (CFList& factors, int* factorsFoundIndex) 832 829 { 833 int index; 834 CanonicalForm tmp1, tmp2; 835 CFListIterator j; 836 Variable y= Variable (2); 837 for (CFListIterator i= L; i.hasItem(); i++) 838 { 839 index= 1; 840 if (extension) 841 tmp1= mod (i.getItem(), y-eval); 830 CFList result; 831 int i= 0; 832 for (CFListIterator iter= factors; iter.hasItem(); iter++, i++) 833 { 834 if (factorsFoundIndex[i] == 1) 835 continue; 842 836 else 843 tmp1= mod (i.getItem(), y); 844 tmp1 /= Lc (tmp1); 845 for (j= factors; j.hasItem(); j++, index++) 846 { 847 tmp2= mod (j.getItem(), y); 848 tmp2 /= Lc (tmp2); 849 if (tmp1 == tmp2) 850 { 851 index++; 852 j.remove(index); 853 break; 854 } 855 } 856 } 837 result.append (iter.getItem()); 838 } 839 factors= result; 857 840 } 858 841 … … 887 870 for (int i= 0; i < uniFactors.length(); i++) 888 871 factorsFoundIndex [i]= 0; 872 CanonicalForm bufA= A; 889 873 890 874 if (smallFactorDeg >= liftBound || degree (A,y) <= 4) … … 894 878 henselLift12 (A, bufUniFactors, smallFactorDeg, Pi, diophant, M); 895 879 if (!extension) 896 earlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,880 earlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 897 881 factorsFoundIndex, degs, earlySuccess, 898 882 smallFactorDeg); 899 883 else 900 extEarlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,884 extEarlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 901 885 factorsFoundIndex, degs, earlySuccess, info, 902 886 eval, smallFactorDeg); … … 910 894 liftPre[sizeOfLiftPre-1] + 1, Pi, diophant, M); 911 895 if (!extension) 912 earlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,896 earlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 913 897 factorsFoundIndex, degs, earlySuccess, 914 898 liftPre[sizeOfLiftPre-1] + 1); 915 899 else 916 extEarlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,900 extEarlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 917 901 factorsFoundIndex, degs, earlySuccess, info, 918 902 eval, liftPre[sizeOfLiftPre-1] + 1); … … 931 915 liftPre[i-1] + 1, Pi, diophant, M); 932 916 if (!extension) 933 earlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,917 earlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 934 918 factorsFoundIndex, degs, earlySuccess, 935 919 liftPre[i-1] + 1); 936 920 else 937 extEarlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,921 extEarlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 938 922 factorsFoundIndex, degs, earlySuccess, info, 939 923 eval, liftPre[i-1] + 1); … … 954 938 henselLift12 (A, bufUniFactors, smallFactorDeg, Pi, diophant, M); 955 939 if (!extension) 956 earlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,940 earlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 957 941 factorsFoundIndex, degs, earlySuccess, 958 942 smallFactorDeg); 959 943 else 960 extEarlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,944 extEarlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 961 945 factorsFoundIndex, degs, earlySuccess, info, 962 946 eval, smallFactorDeg); … … 971 955 dummy, Pi, diophant, M); 972 956 if (!extension) 973 earlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,957 earlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 974 958 factorsFoundIndex, degs, earlySuccess, dummy); 975 959 else 976 extEarlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,960 extEarlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 977 961 factorsFoundIndex, degs, earlySuccess, info, 978 962 eval, dummy); … … 987 971 dummy, Pi, diophant, M); 988 972 if (!extension) 989 earlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,973 earlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 990 974 factorsFoundIndex, degs, earlySuccess, dummy); 991 975 else 992 extEarlyFactorDetection (earlyFactors, A, bufUniFactors, newLiftBound,976 extEarlyFactorDetection (earlyFactors, bufA, bufUniFactors, newLiftBound, 993 977 factorsFoundIndex, degs, earlySuccess, info, 994 978 eval, dummy); … … 1003 987 if (earlySuccess) 1004 988 liftBound= newLiftBound; 989 } 990 991 A= bufA; 992 if (earlyFactors.length() > 0 && degs.getLength() > 1) 993 { 994 liftBound= degree (A,y) + 1; 995 earlySuccess= true; 996 deleteFactors (bufUniFactors, factorsFoundIndex); 1005 997 } 1006 998 … … 4253 4245 return earlyFactors; 4254 4246 } 4255 int sizeOldF= size (F); 4256 CFList result; 4257 CanonicalForm bufF= F; 4258 if (earlyFactors.length() > 0) 4259 { 4260 for (CFListIterator i= earlyFactors; i.hasItem(); i++) 4261 bufF /= i.getItem(); 4262 } 4263 4264 if (size (bufF) < sizeOldF) 4265 { 4266 H= bufF; 4247 int sizeOldF= size (G); 4248 if (size (F) < sizeOldF) 4249 { 4250 H= F; 4267 4251 success= true; 4268 4252 return earlyFactors; … … 4309 4293 } 4310 4294 Variable y= F.mvar(); 4311 CanonicalForm shiftedF= F(y - evaluation, y);4295 CanonicalForm shiftedF= G (y - evaluation, y); 4312 4296 int sizeOldF= size (shiftedF); 4313 CFList result; 4314 CanonicalForm bufF= shiftedF; 4315 if (earlyFactors.length() > 0) 4316 { 4317 for (CFListIterator i= earlyFactors; i.hasItem(); i++) 4318 { 4319 bufF /= i.getItem(); 4320 result.append (i.getItem()); 4321 } 4322 } 4323 4324 if (size (bufF) < sizeOldF) 4325 { 4326 H= bufF (y + evaluation, y); //shift back to zero 4297 if (size (F) < sizeOldF) 4298 { 4299 H= F (y + evaluation, y); //shift back to zero 4327 4300 success= true; 4328 return result;4301 return earlyFactors; 4329 4302 } 4330 4303 else
Note: See TracChangeset
for help on using the changeset viewer.