Changeset 41fea7 in git for factory


Ignore:
Timestamp:
Mar 9, 2012, 12:46:16 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b4af1bcc6d94130065fbe01fbd2210fee3f1983e
Parents:
ca058cdd63fd41f47dfc543efa0ec6a1fd26553d
git-author:
Martin Lee <martinlee84@web.de>2012-03-09 12:46:16+01:00
git-committer:
Martin Lee <martinlee84@web.de>2012-04-04 14:42:27+02:00
Message:
fix: divisibility testing
chg: coeff bound for factorization over Q(a)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    rca058c r41fea7  
    487487  bool recombination= false;
    488488  CanonicalForm test;
    489   CanonicalForm buf0= mulNTL (buf (0, x), LCBuf, b);
     489  CanonicalForm buf0= mulNTL (buf (0, x), LCBuf);
    490490  bool isRat= (isOn (SW_RATIONAL) && getCharacteristic() == 0) || getCharacteristic() > 0;
    491491  while (T.length() >= 2*s && s <= thres)
     
    546546            if (!isRat)
    547547              Off (SW_RATIONAL);
    548             buf0= mulNTL (buf (0, x), LCBuf, b);
     548            buf0= mulNTL (buf (0, x), LCBuf);
    549549            // compute new possible degree pattern
    550550            bufDegs2= DegreePattern (T);
     
    663663  adaptedLiftBound= 0;
    664664  int d= degree (F), l= 0;
    665   CanonicalForm buf0= mulNTL (buf (0,x), LCBuf, b);
    666   CanonicalForm buf1= mulNTL (buf (1,x), LCBuf, b);
     665  CanonicalForm buf0= mulNTL (buf (0,x), LCBuf);
     666  CanonicalForm buf1= mulNTL (buf (1,x), LCBuf);
    667667  CanonicalForm test0, test1;
    668668  bool isRat= (isOn (SW_RATIONAL) && getCharacteristic() == 0) || getCharacteristic() > 0;
     
    694694            if (!isRat)
    695695              Off (SW_RATIONAL);
    696             buf0= mulNTL (buf (0,x), LCBuf, b);
    697             buf1= mulNTL (buf (1,x), LCBuf, b);
     696            buf0= mulNTL (buf (0,x), LCBuf);
     697            buf1= mulNTL (buf (1,x), LCBuf);
    698698            T= Difference (T, CFList (i.getItem()));
    699699            F= buf;
     
    914914  if (getCharacteristic() == 0 && b.getp() != 0)
    915915  {
    916     lcA0= lc (A (0, 2));
    917     A *= b.inverse (lcA0);
    918     A= b (A);
    919     for (CFListIterator i= bufUniFactors; i.hasItem(); i++)
    920       i.getItem()= b (i.getItem()*b.inverse (lc (i.getItem())));
     916    if (alpha.level() == 1)
     917    {
     918      lcA0= lc (A (0, 2));
     919      A *= b.inverse (lcA0);
     920      A= b (A);
     921      for (CFListIterator i= bufUniFactors; i.hasItem(); i++)
     922        i.getItem()= b (i.getItem()*b.inverse (lc (i.getItem())));
     923    }
     924    else
     925    {
     926      lcA0= Lc (A (0,2));
     927      ZZX NTLlcA0= convertFacCF2NTLZZX (lcA0);
     928      ZZX NTLmipo= convertFacCF2NTLZZX (getMipo (alpha));
     929      ZZ NTLpk= power_ZZ (b.getp(), b.getk());
     930      ZZ_p::init (NTLpk);
     931      ZZ_pX S, T, G;
     932      XGCD (G, S, T, to_ZZ_pX (NTLlcA0), to_ZZ_pX(NTLmipo));
     933      CanonicalForm lcA0inverse= convertNTLZZX2CF (to_ZZX (S), alpha);
     934      A *= lcA0inverse;
     935      A= b (A);
     936      // Lc of bufUniFactors is in Z
     937      for (CFListIterator i= bufUniFactors; i.hasItem(); i++)
     938        i.getItem()= b (i.getItem()*b.inverse (lc (i.getItem())));
     939    }
    921940  }
    922941  bufUniFactors.insert (LC (A, x));
Note: See TracChangeset for help on using the changeset viewer.