Changeset 7e8c9e in git
- Timestamp:
- Dec 20, 2011, 1:37:08 AM (11 years ago)
- Branches:
- (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
- Children:
- ae3775b687b92e288f8dd89a3aee50987ac3ca37
- Parents:
- 97a0599a2c91cf3fd4b1b2efcdf9d0a40caf5746
- git-author:
- Martin Lee <martinlee84@web.de>2011-12-20 00:37:08+00:00
- git-committer:
- Martin Lee <martinlee84@web.de>2012-04-04 14:42:24+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_gcd.cc
r97a059 r7e8c9e 29 29 static CanonicalForm gcd_univar_ntl0( const CanonicalForm &, const CanonicalForm & ); 30 30 static CanonicalForm gcd_univar_ntlp( const CanonicalForm &, const CanonicalForm & ); 31 #endif 32 33 #ifdef HAVE_FLINT 34 #include "FLINTconvert.h" 35 static CanonicalForm gcd_univar_flint0 (const CanonicalForm &, const CanonicalForm &); 36 static CanonicalForm gcd_univar_flintp (const CanonicalForm &, const CanonicalForm &); 31 37 #endif 32 38 … … 545 551 { 546 552 bpure = isPurePoly(pi) && isPurePoly(pi1); 547 #ifdef HAVE_NTL 553 #ifdef HAVE_FLINT 554 if (bpure && (CFFactory::gettype() != GaloisFieldDomain)) 555 return gcd_univar_flintp(pi,pi1)*C; 556 #else ifdef HAVE_NTL 548 557 if ( isOn(SW_USE_NTL_GCD_P) && bpure && (CFFactory::gettype() != GaloisFieldDomain)) 549 558 return gcd_univar_ntlp(pi, pi1 ) * C; … … 618 627 if ( pi.isUnivariate() && pi1.isUnivariate() ) 619 628 { 620 #ifdef HAVE_NTL 629 #ifdef HAVE_FLINT 630 if (isPurePoly(pi) && isPurePoly(pi1) ) 631 return gcd_univar_flint0(pi, pi1 ) * C; 632 #else ifdef HAVE_NTL 621 633 if ( isOn(SW_USE_NTL_GCD_0) && isPurePoly(pi) && isPurePoly(pi1) ) 622 634 return gcd_univar_ntl0(pi, pi1 ) * C; … … 1044 1056 #endif 1045 1057 1058 #ifdef HAVE_FLINT 1059 static CanonicalForm 1060 gcd_univar_flintp (const CanonicalForm& F, const CanonicalForm& G) 1061 { 1062 nmod_poly_t F1, G1; 1063 convertFacCF2nmod_poly_t (F1, F); 1064 convertFacCF2nmod_poly_t (G1, G); 1065 nmod_poly_gcd (F1, F1, G1); 1066 CanonicalForm result= convertnmod_poly_t2FacCF (F1, F.mvar()); 1067 nmod_poly_clear (F1); 1068 nmod_poly_clear (G1); 1069 return result; 1070 } 1071 1072 static CanonicalForm 1073 gcd_univar_flint0( const CanonicalForm & F, const CanonicalForm & G ) 1074 { 1075 fmpz_poly_t F1, G1; 1076 convertFacCF2Fmpz_poly_t(F1, F); 1077 convertFacCF2Fmpz_poly_t(G1, G); 1078 fmpz_poly_gcd (F1, F1, G1); 1079 CanonicalForm result= convertFmpz_poly_t2FacCF (F1, F.mvar()); 1080 fmpz_poly_clear (F1); 1081 fmpz_poly_clear (G1); 1082 return result; 1083 } 1084 #endif 1085 1086 1046 1087 /* 1047 1088 * compute positions p1 and pe of optimal variables:
Note: See TracChangeset
for help on using the changeset viewer.