Changeset 9d572a5 in git for factory/facFqBivar.cc


Ignore:
Timestamp:
Aug 30, 2012, 6:22:26 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
621271b927d1fdc10d6cecef99d86f869d2563dc
Parents:
32a8db29c4a1071141bad215324303654975186d
git-author:
Martin Lee <martinlee84@web.de>2012-08-30 18:22:26+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-09-05 15:00:02+02:00
Message:
fix: bug in bivariate factorization over non prime finite fields
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    r32a8db2 r9d572a5  
    51515151    else
    51525152    {
    5153       int * zeroOne= extractZeroOneVecs (NTLN);
     5153      int * zeroOne;
     5154      long numCols, numRows;
     5155      if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp))
     5156      {
     5157        numCols= NTLN.NumCols();
     5158        numRows= NTLN.NumRows();
     5159        zeroOne= extractZeroOneVecs (NTLN);
     5160      }
     5161      else
     5162      {
     5163        numCols= NTLNe.NumCols();
     5164        numRows= NTLNe.NumRows();
     5165        zeroOne= extractZeroOneVecs (NTLNe);
     5166      }
    51545167      CFList bufBufUniFactors= bufUniFactors;
    51555168      CFListIterator iter, iter2;
     
    51575170      CFList factorsConsidered;
    51585171      CanonicalForm tmp;
    5159       for (int i= 0; i < NTLN.NumCols(); i++)
     5172      for (int i= 0; i < numCols; i++)
    51605173      {
    51615174        if (zeroOne [i] == 0)
     
    51645177        buf= 1;
    51655178        factorsConsidered= CFList();
    5166         for (int j= 0; j < NTLN.NumRows(); j++, iter++)
    5167         {
    5168           if (!IsZero (NTLN (j + 1,i + 1)))
     5179        for (int j= 0; j < numRows; j++, iter++)
     5180        {
     5181          if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp))
    51695182          {
    5170             factorsConsidered.append (iter.getItem());
    5171             buf *= mod (iter.getItem(), y);
     5183            if (!IsZero (NTLN (j + 1,i + 1)))
     5184            {
     5185              factorsConsidered.append (iter.getItem());
     5186              buf *= mod (iter.getItem(), y);
     5187            }
     5188          }
     5189          else
     5190          {
     5191            if (!IsZero (NTLNe (j + 1,i + 1)))
     5192            {
     5193              factorsConsidered.append (iter.getItem());
     5194              buf *= mod (iter.getItem(), y);
     5195            }
    51725196          }
    51735197        }
Note: See TracChangeset for help on using the changeset viewer.