Changeset 9752db in git
- Timestamp:
- May 10, 2012, 6:47:22 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- d0015c9c5906ccd1040927a2140a137a93d743b1
- Parents:
- 5428647f3ac13d90ef45d257602f128804d6920a
- git-author:
- Martin Lee <martinlee84@web.de>2012-05-10 18:47:22+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-05-15 18:37:46+02:00
- Location:
- factory
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cfNewtonPolygon.cc
r542864 r9752db 857 857 return result; 858 858 } 859 860 bool irreducibilityTest (const CanonicalForm& F) 861 { 862 int sizeOfNewtonPolygon; 863 int ** newtonPolyg= newtonPolygon (F, sizeOfNewtonPolygon); 864 if (sizeOfNewtonPolygon == 3) 865 { 866 bool check1= 867 (newtonPolyg[0][0]==0 || newtonPolyg[1][0]==0 || newtonPolyg[2][0]==0); 868 if (check1) 869 { 870 bool check2= 871 (newtonPolyg[0][1]==0 || newtonPolyg[1][1]==0 || newtonPolyg[2][0]==0); 872 if (check2) 873 { 874 bool isRat= isOn (SW_RATIONAL); 875 if (isRat) 876 Off (SW_RATIONAL); 877 CanonicalForm tmp= gcd (newtonPolyg[0][0],newtonPolyg[0][1]); 878 tmp= gcd (tmp, newtonPolyg[1][0]); 879 tmp= gcd (tmp, newtonPolyg[1][1]); 880 tmp= gcd (tmp, newtonPolyg[2][0]); 881 tmp= gcd (tmp, newtonPolyg[2][1]); 882 if (isRat) 883 On (SW_RATIONAL); 884 if (tmp == 1) 885 { 886 for (int i= 0; i < sizeOfNewtonPolygon; i++) 887 delete [] newtonPolyg [i]; 888 delete [] newtonPolyg; 889 } 890 return (tmp==1); 891 } 892 } 893 } 894 for (int i= 0; i < sizeOfNewtonPolygon; i++) 895 delete [] newtonPolyg [i]; 896 delete [] newtonPolyg; 897 return false; 898 } -
factory/cfNewtonPolygon.h
r542864 r9752db 68 68 ); 69 69 70 /// computes the Newton polygon of F and checks if it satisfies the 71 /// irreducibility criterion from S.Gao "Absolute irreducibility of polynomials 72 /// via polytopes", Example 1 73 /// 74 /// @return true if it satisfies the above criterion, false otherwise 75 bool 76 irreducibilityTest (const CanonicalForm& F ///<[in] a bivariate polynomial 77 ); 78 70 79 #ifdef HAVE_NTL 71 80 /// Algorithm 5 as described in Convex-Dense Bivariate Polynomial Factorization -
factory/facBivar.cc
r542864 r9752db 460 460 } 461 461 462 if (irreducibilityTest (A)) 463 { 464 CFList factors; 465 factors.append (A); 466 467 appendSwapDecompress (factors, conv (contentAxFactors), 468 conv (contentAyFactors), false, false, N); 469 470 normalize (factors); 471 return factors; 472 } 462 473 bool swap= false; 463 474 if (degree (A) > degree (A, x))
Note: See TracChangeset
for help on using the changeset viewer.