Changeset afb6a6 in git for factory


Ignore:
Timestamp:
May 29, 2012, 12:36:02 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
17642b3261157040015bc8ef3c5a395ba70f33cb
Parents:
978ce3797e3d0033ec5e19fe7a106e25a5309746
git-author:
Martin Lee <martinlee84@web.de>2012-05-29 12:36:02+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-05-30 17:39:25+02:00
Message:
chg: reduce the number of bivariate factorizations
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFactorize.cc

    r978ce3 rafb6a6  
    113113  Variable v;
    114114  CFList factors;
    115   for (int j= 0; j < A.level() - 2; j++)
    116   {
    117     if (!Aeval[j].isEmpty())
    118     {
    119       v= Variable (Aeval[j].getFirst().level());
    120 
    121       factors= ratBiSqrfFactorize (Aeval[j].getFirst(), w);
    122 
    123       if (factors.getFirst().inCoeffDomain())
    124         factors.removeFirst();
    125 
    126       if (minFactorsLength == 0)
    127         minFactorsLength= factors.length();
    128       else
    129         minFactorsLength= tmin (minFactorsLength, factors.length());
    130 
    131       if (factors.length() == 1)
    132       {
    133         irred= true;
    134         return;
    135       }
    136       sortList (factors, x);
    137       Aeval [j]= factors;
    138     }
     115  CanonicalForm LCA= LC (A,1);
     116  if (!LCA.inCoeffDomain())
     117  {
     118    for (int j= 0; j < A.level() - 2; j++)
     119    {
     120      if (!Aeval[j].isEmpty() && (degree (LCA, j+3) > 0))
     121      {
     122        v= Variable (Aeval[j].getFirst().level());
     123
     124        factors= ratBiSqrfFactorize (Aeval[j].getFirst(), w);
     125
     126        if (factors.getFirst().inCoeffDomain())
     127          factors.removeFirst();
     128
     129        if (minFactorsLength == 0)
     130          minFactorsLength= factors.length();
     131        else
     132          minFactorsLength= tmin (minFactorsLength, factors.length());
     133
     134        if (factors.length() == 1)
     135        {
     136          irred= true;
     137          return;
     138        }
     139        sortList (factors, x);
     140        Aeval [j]= factors;
     141      }
     142      else if (!Aeval[j].isEmpty())
     143      {
     144        Aeval[j]=CFList();
     145      }
     146    }
     147  }
     148  else
     149  {
     150    for (int j= 0; j < A.level() - 2; j++)
     151      Aeval[j]= CFList();
    139152  }
    140153}
Note: See TracChangeset for help on using the changeset viewer.