Changeset c8f95d in git


Ignore:
Timestamp:
Sep 10, 2012, 2:55:20 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '2234726c50d679d6664181a5c72f75a6fd64a787')
Children:
4782bce35ff5691eb0a20e9bcbc6b9df9724de3f
Parents:
fd2316c2e0e6f039690abb0a0f07314d57dc7ef5
git-author:
Martin Lee <martinlee84@web.de>2012-09-10 14:55:20+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-10-25 15:10:32+02:00
Message:
chg: use flint in extgcd over Z/p
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_gcd.cc

    rfd2316c rc8f95d  
    307307  }
    308308#ifdef HAVE_NTL
     309#ifdef HAVE_FLINT
     310  if (( getCharacteristic() > 0 ) && (CFFactory::gettype() != GaloisFieldDomain)
     311  &&  (f.level()==g.level()) && isPurePoly(f) && isPurePoly(g))
     312  {
     313    nmod_poly_t F1, G1, A, B, R;
     314    convertFacCF2nmod_poly_t (F1, f);
     315    convertFacCF2nmod_poly_t (G1, g);
     316    nmod_poly_init (R, getCharacteristic());
     317    nmod_poly_init (A, getCharacteristic());
     318    nmod_poly_init (B, getCharacteristic());
     319    nmod_poly_xgcd (R, A, B, F1, G1);
     320    a= convertnmod_poly_t2FacCF (A, f.mvar());
     321    b= convertnmod_poly_t2FacCF (B, f.mvar());
     322    CanonicalForm r= convertnmod_poly_t2FacCF (R, f.mvar());
     323    nmod_poly_clear (F1);
     324    nmod_poly_clear (G1);
     325    nmod_poly_clear (A);
     326    nmod_poly_clear (B);
     327    nmod_poly_clear (R);
     328    return r;
     329  }
     330#else
    309331  if (isOn(SW_USE_NTL_GCD_P) && ( getCharacteristic() > 0 ) && (CFFactory::gettype() != GaloisFieldDomain)
    310332  &&  (f.level()==g.level()) && isPurePoly(f) && isPurePoly(g))
     
    347369    #endif
    348370  }
     371#endif
    349372#ifdef HAVE_FLINT
    350373  if (( getCharacteristic() ==0) && (f.level()==g.level())
Note: See TracChangeset for help on using the changeset viewer.