Changeset 69076c in git


Ignore:
Timestamp:
Jan 23, 2012, 10:56:15 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
db65ada582680024acbac9836a6e6efb6100c8a9
Parents:
a541144c391fb958d4c9ea1ac173dc1c117fb51f
git-author:
Martin Lee <martinlee84@web.de>2012-01-23 22:56:15+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-10 14:16:44+01:00
Message:
chg: use shape of Newton polygon for factor detection and
     use lower lift bound
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    ra54114 r69076c  
    853853  bool extension= info.isInExtension();
    854854
     855  int sizeOfLiftPre;
     856  int * liftPre= getLiftPrecisions (A, sizeOfLiftPre, degree (LC (A, 1), 2));
     857
    855858  Variable x= Variable (1);
    856859  Variable y= Variable (2);
     
    862865  earlySuccess= false;
    863866  int newLiftBound= 0;
    864   int smallFactorDeg= 11; //this is a tunable parameter
    865   if (smallFactorDeg >= liftBound)
     867
     868  int smallFactorDeg= tmin (11, liftPre [sizeOfLiftPre- 1] + 1);//this is a tunable parameter
     869  int dummy;
     870  if (smallFactorDeg >= liftBound || degree (A,y) <= 4)
    866871    henselLift12 (A, bufUniFactors, liftBound, Pi, diophant, M);
    867   else if (smallFactorDeg >= degree (A, y) + 1)
    868   {
    869     henselLift12 (A, bufUniFactors, degree (A, y) + 1, Pi, diophant, M);
     872  else if (sizeOfLiftPre > 1 && sizeOfLiftPre < 30)
     873  {
     874    henselLift12 (A, bufUniFactors, smallFactorDeg, Pi, diophant, M);
    870875    if (!extension)
    871876      earlyFactors= earlyFactorDetection (A, bufUniFactors, newLiftBound,
    872                      degs, earlySuccess, degree (A, y) + 1);
     877                     degs, earlySuccess, smallFactorDeg);
    873878    else
    874879      earlyFactors= extEarlyFactorDetection (A, bufUniFactors,
    875880                     newLiftBound, degs, earlySuccess, info, eval,
    876                      degree (A, y) + 1);
    877     if (degs.getLength() > 1 && !earlySuccess)
    878     {
    879       if (newLiftBound > degree (A, y) + 1)
    880       {
    881         liftBound= newLiftBound;
    882         bufUniFactors.insert (LC(A, x));
    883         henselLiftResume12 (A, bufUniFactors, degree (A, y) + 1, liftBound,
    884                             Pi, diophant, M);
     881                     smallFactorDeg);
     882    if (degs.getLength() > 1 && !earlySuccess &&
     883        smallFactorDeg != liftPre [sizeOfLiftPre-1] + 1)
     884    {
     885      if (newLiftBound >= liftPre[sizeOfLiftPre-1]+1)
     886      {
     887        bufUniFactors.insert (LC (A, x));
     888        henselLiftResume12 (A, bufUniFactors, smallFactorDeg,
     889                            liftPre[sizeOfLiftPre-1] + 1, Pi, diophant, M);
     890        if (!extension)
     891          earlyFactors= earlyFactorDetection (A, bufUniFactors, newLiftBound,
     892                        degs, earlySuccess, liftPre[sizeOfLiftPre-1] + 1);
     893        else
     894          earlyFactors= extEarlyFactorDetection (A, bufUniFactors,
     895                        newLiftBound, degs, earlySuccess, info, eval,
     896                        liftPre[sizeOfLiftPre-1] + 1);
    885897      }
    886898    }
    887899    else if (earlySuccess)
    888900      liftBound= newLiftBound;
    889   }
    890   else if (smallFactorDeg < degree (A, y) + 1)
     901
     902    int i= sizeOfLiftPre - 1;
     903    while (degs.getLength() > 1 && !earlySuccess && i - 1 >= 0)
     904    {
     905      if (newLiftBound >= liftPre[i] + 1)
     906      {
     907        bufUniFactors.insert (LC (A, x));
     908        henselLiftResume12 (A, bufUniFactors, liftPre[i] + 1,
     909                            liftPre[i-1] + 1, Pi, diophant, M);
     910        if (!extension)
     911          earlyFactors= earlyFactorDetection (A, bufUniFactors, newLiftBound,
     912                        degs, earlySuccess, liftPre[i-1] + 1);
     913        else
     914          earlyFactors= extEarlyFactorDetection (A, bufUniFactors,
     915                        newLiftBound, degs, earlySuccess, info, eval,
     916                        liftPre[i-1] + 1);
     917      }
     918      else
     919      {
     920        liftBound= newLiftBound;
     921        break;
     922      }
     923      i--;
     924    }
     925    if (earlySuccess)
     926      liftBound= newLiftBound;
     927    //after here all factors are lifted to liftPre[sizeOfLiftPre-1]
     928  }
     929  else
    891930  {
    892931    henselLift12 (A, bufUniFactors, smallFactorDeg, Pi, diophant, M);
    893932    if (!extension)
    894933      earlyFactors= earlyFactorDetection (A, bufUniFactors, newLiftBound,
    895                                            degs, earlySuccess,
    896                                            smallFactorDeg);
     934                     degs, earlySuccess, smallFactorDeg);
    897935    else
    898936      earlyFactors= extEarlyFactorDetection (A, bufUniFactors,
    899                      newLiftBound, degs, earlySuccess,
    900                      info, eval, smallFactorDeg);
    901     if (degs.getLength() > 1 && !earlySuccess)
     937                     newLiftBound, degs, earlySuccess, info, eval,
     938                     smallFactorDeg);
     939    int i= 1;
     940    while ((degree (A,y)/4)*i + 4 <= smallFactorDeg)
     941      i++;
     942    dummy= tmin (degree (A,y)+1, (degree (A,y)/4)*i+4);
     943    if (degs.getLength() > 1 && !earlySuccess && dummy > smallFactorDeg)
    902944    {
    903945      bufUniFactors.insert (LC (A, x));
    904       henselLiftResume12 (A, bufUniFactors, smallFactorDeg, degree (A, y)
    905                           + 1, Pi, diophant, M);
     946      henselLiftResume12 (A, bufUniFactors, smallFactorDeg,
     947                          dummy, Pi, diophant, M);
    906948      if (!extension)
    907949        earlyFactors= earlyFactorDetection (A, bufUniFactors, newLiftBound,
    908                        degs, earlySuccess, degree (A, y) + 1);
     950                      degs, earlySuccess, dummy);
    909951      else
    910952        earlyFactors= extEarlyFactorDetection (A, bufUniFactors,
    911                        newLiftBound, degs, earlySuccess,
    912                        info, eval, degree(A,y) + 1);
    913       if (degs.getLength() > 1 && !earlySuccess)
    914       {
    915         if (newLiftBound > degree (A, y) + 1)
    916         {
    917           bufUniFactors.insert (LC(A, x));
    918           henselLiftResume12 (A, bufUniFactors, degree (A, y) + 1, liftBound,
    919                               Pi, diophant, M);
    920         }
    921       }
    922       else if (earlySuccess)
     953                      newLiftBound, degs, earlySuccess, info, eval,
     954                      dummy);
     955    }
     956    while (degs.getLength() > 1 && !earlySuccess && i < 4)
     957    {
     958      if (newLiftBound >= dummy)
     959      {
     960        bufUniFactors.insert (LC (A, x));
     961        dummy= tmin (degree (A,y)+1, (degree (A,y)/4)*(i+1)+4);
     962        henselLiftResume12 (A, bufUniFactors, (degree (A,y)/4)*i + 4,
     963                            dummy, Pi, diophant, M);
     964        if (!extension)
     965          earlyFactors= earlyFactorDetection (A, bufUniFactors, newLiftBound,
     966                        degs, earlySuccess, dummy);
     967        else
     968          earlyFactors= extEarlyFactorDetection (A, bufUniFactors,
     969                        newLiftBound, degs, earlySuccess, info, eval,
     970                        dummy);
     971      }
     972      else
     973      {
    923974        liftBound= newLiftBound;
    924     }
    925     else if (earlySuccess)
     975        break;
     976      }
     977      i++;
     978    }
     979    if (earlySuccess)
    926980      liftBound= newLiftBound;
    927981  }
    928   if (newLiftBound > 0)
    929     liftBound= newLiftBound;
     982
     983  if (!earlySuccess)
     984    liftBound= degree (A,y) + 1;
     985
     986  delete [] liftPre;
     987
    930988  return bufUniFactors;
    931989}
Note: See TracChangeset for help on using the changeset viewer.