Changeset 6036d90 in git


Ignore:
Timestamp:
Nov 18, 2011, 5:41:42 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
Children:
615ca847eb54f53d0896364932b51cc9074dffda
Parents:
7d58b610fedb008c184de5ef38c1cd5bc05d1ecc
git-author:
Martin Lee <martinlee84@web.de>2011-11-18 17:41:42+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-11-19 03:27:46+01:00
Message:
added heuristic for sparse lifting and updated tests
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Tst/Long/factorizep_l.res.gz.uu

    r7d58b6 r6036d90  
    11begin 644 factorizep_l.res.gz
    2 M'XL("'#T^4T``V9A8W1O<FEZ97!?;"YR97,`G/U-KRVY<B4(SO4K+FHDQ7GG
     2M'XL("$S,PTX``V9A8W1O<FEZ97!?;"YR97,`G/U-KRVY<B4(SO4K+FHDQ7GG
    33MP?E-EOIIT*A)`HV:9,T2>HGL;"DA0$@E=%]WG1.-_N_-M9:9T7WOFUD)(1`1
    44MQ[G=S>FDD;3/9?_^__C?_MW__N/'C_1W/_X?_^[__N-_^<O/O_SQG__I__F_
  • Tst/Long/factorizep_l.stat

    r7d58b6 r6036d90  
    1 1 >> tst_memory_0 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:810116
    2 1 >> tst_memory_1 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:5160960
    3 1 >> tst_memory_2 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:21938176
    4 1 >> tst_timer :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:5474
    5 2 >> tst_memory_0 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:901112
    6 2 >> tst_memory_1 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:5160960
    7 2 >> tst_memory_2 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:33996800
    8 2 >> tst_timer :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:8848
    9 3 >> tst_memory_0 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:1153472
    10 3 >> tst_memory_1 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:7782400
    11 3 >> tst_memory_2 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:33996800
    12 3 >> tst_timer_1 :: 1308226670:3132- 13777 :3-1-3:ix86-Linux:mamawutz:17335
     11 >> tst_memory_0 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:699536
     21 >> tst_memory_1 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:3145728
     31 >> tst_memory_2 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:22020096
     41 >> tst_timer :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:3695
     52 >> tst_memory_0 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:1386868
     62 >> tst_memory_1 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:3735552
     72 >> tst_memory_2 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:29949952
     82 >> tst_timer :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:2774
     93 >> tst_memory_0 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:1610380
     103 >> tst_memory_1 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:6881280
     113 >> tst_memory_2 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:29949952
     123 >> tst_timer_1 :: 1321454668:3133- exported :3-1-3:ix86-Linux:mamawutz:9926
  • Tst/Short/factorizep_s.res.gz.uu

    r7d58b6 r6036d90  
    11begin 644 factorizep_s.res.gz
    2 M'XL("'4D^TT``V9A8W1O<FEZ97!?<RYR97,`E/U-DRQ/>MV)[?DIKLU&#00<
     2M'XL(",O,PTX``V9A8W1O<FEZ97!?<RYR97,`E/U-DRQ/>MV)[?DIKLU&#00<
    33M<\O?2Q2P&)L-S<9F,[,;(V@4"5!M:@$T=$N\1=E\=X6?YSS',SRB;KJ,1E3T
    44M_Z:'9U5F^-OS.^?\;__[__SO_M<?/WY\_/V/_^7?_4\__H>__/DO?_NG/_[?
  • Tst/Short/factorizep_s.stat

    r7d58b6 r6036d90  
    1 1 >> tst_memory_0 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:322888
    2 1 >> tst_memory_1 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:929792
    3 1 >> tst_memory_2 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:929792
    4 1 >> tst_timer :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:697
    5 2 >> tst_memory_0 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:530256
    6 2 >> tst_memory_1 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:1601536
    7 2 >> tst_memory_2 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:2125824
    8 2 >> tst_timer_1 :: 1308304499:3132- 13777 :3-1-3:ix86-Linux:mamawutz:1054
     11 >> tst_memory_0 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:300444
     21 >> tst_memory_1 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:933888
     31 >> tst_memory_2 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:933888
     41 >> tst_timer :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:719
     52 >> tst_memory_0 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:484772
     62 >> tst_memory_1 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:1073152
     72 >> tst_memory_2 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:1073152
     82 >> tst_timer_1 :: 1321454794:3133- exported :3-1-3:ix86-Linux:mamawutz:961
  • factory/facFactorize.cc

    r7d58b6 r6036d90  
    695695    refineBiFactors (A, biFactors, Aeval2, evaluation, minFactorsLength);
    696696
     697  if (differentSecondVar == A.level() - 2)
     698  {
     699    bool zeroOccured= false;
     700    for (CFListIterator iter= evaluation; iter.hasItem(); iter++)
     701    {
     702      if (iter.getItem().isZero())
     703      {
     704        zeroOccured= true;
     705        break;
     706      }
     707    }
     708    if (!zeroOccured)
     709    {
     710      factors= sparseHeuristic (A, biFactors, Aeval2, evaluation, minFactorsLength);
     711      if (factors.length() == biFactors.length())
     712      {
     713        appendSwapDecompress (factors, contentAFactors, N, 0, 0, x);
     714        normalize (factors);
     715        delete [] Aeval2;
     716        return factors;
     717      }
     718      else
     719        factors= CFList();
     720      //TODO case where factors.length() > 0
     721    }
     722  }
     723
    697724  CFList uniFactors= buildUniFactors (biFactors, evaluation.getLast(), y);
    698725
  • factory/facFqFactorize.cc

    r7d58b6 r6036d90  
    3939TIMING_DEFINE_PRINT(fac_hensel_lift)
    4040TIMING_DEFINE_PRINT(fac_factor_recombination)
     41
     42CFList
     43recombination (const CFList& factors1, const CFList& factors2, int s, int thres,
     44               const CanonicalForm& evalPoint, const Variable& x);
     45
     46static
     47int comp (const CanonicalForm& A, const CanonicalForm& B)
     48{
     49  if (A.inCoeffDomain() && !B.inCoeffDomain())
     50    return -1;
     51  else if (!A.inCoeffDomain() && B.inCoeffDomain())
     52    return 1;
     53  else if (A.inCoeffDomain() && B.inCoeffDomain())
     54    return 0;
     55  else if (degree (A, 1) > degree (B, 1))
     56    return 1;
     57  else if (degree (A, 1) < degree (B, 1))
     58    return -1;
     59  // here A and B are not in CoeffDomain
     60  if (degree (A) > degree (B))
     61    return 1;
     62  else if (degree (A) < degree (B))
     63    return -1;
     64  return 0;
     65}
     66
     67static
     68void swap (CFArray& A, int i, int j)
     69{
     70  CanonicalForm tmp= A[i];
     71  A[i]= A[j];
     72  A[j]= tmp;
     73}
     74
     75static
     76void quickSort (int lo, int hi, CFArray& A)
     77{
     78  int i= lo, j= hi;
     79  CanonicalForm tmp= A[(lo+hi)/2];
     80  while (i <= j)
     81  {
     82    while (comp (A [i], tmp) < 0 && i < hi) i++;
     83    while (comp (tmp, A[j]) < 0 && j > lo) j--;
     84    if (i <= j)
     85    {
     86      swap (A, i, j);
     87      i++;
     88      j--;
     89    }
     90  }
     91  if (lo < j) quickSort (lo, j, A);
     92  if (i < hi) quickSort (i, hi, A);
     93}
     94
     95static
     96void sort (CFArray& A)
     97{
     98  quickSort (0, A.size() - 1, A);
     99}
     100
     101CFList
     102findNormalizingFactor1 (const CFList& biFactors, const CanonicalForm& evalPoint,
     103                        CFList& uniFactors)
     104{
     105  CFList result;
     106  CanonicalForm tmp;
     107  for (CFListIterator i= biFactors; i.hasItem(); i++)
     108  {
     109    tmp= i.getItem() (evalPoint);
     110    uniFactors.append (tmp /Lc (tmp));
     111    result.append (Lc (tmp));
     112  }
     113  return result;
     114}
     115
     116CFList
     117findNormalizingFactor2 (CFList& biFactors, const CanonicalForm& evalPoint,
     118                        const CFList& uniFactors)
     119{
     120  CFList result;
     121  CFList uniBiFactors= biFactors;
     122  CFList newBiFactors;
     123  CFList l;
     124  int pos;
     125  CFListIterator iter;
     126  for (iter= uniBiFactors; iter.hasItem(); iter++)
     127  {
     128    iter.getItem()= iter.getItem() (evalPoint);
     129    l.append (Lc (iter.getItem()));
     130    iter.getItem() /= Lc (iter.getItem());
     131  }
     132  for (CFListIterator i= uniFactors; i.hasItem(); i++)
     133  {
     134    pos= findItem (uniBiFactors, i.getItem());
     135    newBiFactors.append (getItem (biFactors, pos));
     136    result.append (getItem (l, pos));
     137  }
     138  biFactors= newBiFactors;
     139  return result;
     140}
     141
     142CFArray
     143getTerms (const CanonicalForm& F)
     144{
     145  CFArray result= CFArray (size (F));
     146  int j= 0;
     147  Variable x= F.mvar();
     148  Variable y= Variable (1);
     149  CFIterator k;
     150  for (CFIterator i= F; i.hasTerms(); i++)
     151  {
     152    for (k= i.coeff(); k.hasTerms(); k++, j++)
     153      result[j]= k.coeff()*power (x,i.exp())*power (y,k.exp());
     154  }
     155  sort (result);
     156  return result;
     157}
     158
     159void getTerms (const CFList& F, CFArray* result)
     160{
     161  int j= 0;
     162  for (CFListIterator i= F; i.hasItem(); i++, j++)
     163    result[j]= getTerms (i.getItem());
     164}
     165
     166CFArray
     167evaluate (const CFArray& A, const CanonicalForm& eval, const Variable& y)
     168{
     169  int j= A.size();
     170  CFArray result= CFArray (j);
     171  for (int i= 0; i < j; i++)
     172    result [i]= A[i] (eval, y);
     173  return result;
     174}
     175
     176CFArray*
     177evaluate (CFArray* const& A, int sizeA, const CanonicalForm& eval,
     178          const Variable& y)
     179{
     180  CFArray* result= new CFArray [sizeA];
     181  for (int i= 0; i < sizeA; i++)
     182    result[i]= evaluate (A[i], eval, y);
     183  return result;
     184}
     185
     186CFList normalize (const CFList& L, const CFList& normalizingFactor)
     187{
     188  CFList result;
     189  CFListIterator j= normalizingFactor;
     190  for (CFListIterator i= L; i.hasItem(); i++, j++)
     191    result.append (i.getItem() / j.getItem());
     192  return result;
     193}
     194
     195int search (const CFArray& A, const CanonicalForm& F, int i, int j)
     196{
     197  for (; i < j; i++)
     198    if (A[i] == F)
     199      return i;
     200  return -1;
     201}
     202
     203CanonicalForm patch (const CanonicalForm& F1, const CanonicalForm& F2,
     204                     const CanonicalForm& eval)
     205{
     206  CanonicalForm result= F1;
     207  if (F2.level() != 1)
     208  {
     209    int d= degree (F2);
     210    result *= power (F2.mvar(), d);
     211    result /= power (eval, d);
     212  }
     213  return result;
     214}
     215
     216CFList
     217sparseHeuristic (const CanonicalForm& A, const CFList& biFactors,
     218                 CFList*& moreBiFactors, const CFList& evaluation,
     219                 int minFactorsLength)
     220{
     221  int j= A.level() - 1;
     222  int i;
     223
     224  //initialize storage
     225  CFArray *** storeFactors= new CFArray** [j];
     226  for (i= 0; i < j; i++)
     227    storeFactors [i]= new CFArray* [2];
     228
     229  CFArray eval= CFArray (j);
     230  i= j - 1;
     231  for (CFListIterator iter= evaluation; iter.hasItem(); iter++,i--)
     232    eval[i]= iter.getItem();
     233  storeFactors [0] [0]= new CFArray [minFactorsLength];
     234  storeFactors [0] [1]= new CFArray [minFactorsLength];
     235  for (i= 1; i < j; i++)
     236  {
     237    storeFactors[i] [0]= new CFArray [minFactorsLength];
     238    storeFactors[i] [1]= new CFArray [minFactorsLength];
     239  }
     240  //
     241
     242  CFList * normalizingFactors= new CFList [j];
     243  CFList uniFactors;
     244  normalizingFactors [0]= findNormalizingFactor1 (biFactors,
     245                                              evaluation.getLast(), uniFactors);
     246  for (i= j - 1; i > 0; i--)
     247  {
     248    if (moreBiFactors[i-1].length() != minFactorsLength)
     249    {
     250      moreBiFactors[i-1]=
     251        recombination (moreBiFactors [i-1], uniFactors, 1,
     252                       moreBiFactors[i-1].length()-uniFactors.length()+1,
     253                       eval[i], Variable (i + 2)
     254                      );
     255    }
     256    normalizingFactors [i]= findNormalizingFactor2 (moreBiFactors [i - 1],
     257                                                    eval[i], uniFactors);
     258  }
     259
     260  CFList tmp;
     261  tmp= normalize (biFactors, normalizingFactors[0]);
     262  getTerms (tmp, storeFactors [0] [0]);
     263  storeFactors [0] [1]= evaluate (storeFactors [0] [0], minFactorsLength,
     264                                  evaluation.getLast(), Variable (2));
     265  for (i= j - 1; i > 0; i--)
     266  {
     267    tmp= normalize (moreBiFactors [i-1], normalizingFactors [i]);
     268    getTerms (tmp, storeFactors [i] [0]);
     269    storeFactors [i] [1]= evaluate (storeFactors [i] [0], minFactorsLength,
     270                                    eval[i], Variable (i + 2));
     271  }
     272
     273
     274  int k, l, m, mm, count, sizeOfUniFactors= 0;
     275  int*** seperator= new int** [j];
     276  Variable x= Variable (1);
     277
     278  for (i= 0; i < j; i++)
     279    seperator [i]= new int* [minFactorsLength];
     280  for (k= 0; k < minFactorsLength; k++)
     281  {
     282    for (i= 0; i < j; i++)
     283    {
     284      count= 0;
     285      for (l= 0; l < storeFactors [i][0][k].size() - 1; l++)
     286      {
     287        if (degree (storeFactors[i][0][k][l], x) <
     288            degree (storeFactors[i][0][k][l+1], x))
     289          count++;
     290      }
     291      if (i == 0)
     292        sizeOfUniFactors= count;
     293      else if (sizeOfUniFactors != count)
     294      {
     295        for (m= 0; m < j; m++)
     296        {
     297          delete [] storeFactors [m] [0];
     298          delete [] storeFactors [m] [1];
     299          delete [] storeFactors [m];
     300          for (mm= 0; mm < k; mm++)
     301            delete [] seperator [m][mm];
     302          delete [] seperator [m];
     303        }
     304        delete [] storeFactors;
     305        for (m= 0; m < i; m++)
     306          delete [] seperator [m][k];
     307        delete [] seperator;
     308        return CFList();
     309      }
     310      seperator [i][k]= new int [count + 3];
     311      seperator [i][k][0]= count + 1;
     312      seperator [i][k][1]= 0;
     313      count= 2;
     314      for (l= 0; l < storeFactors [i][0][k].size() - 1; l++)
     315      {
     316        if (degree (storeFactors[i][0][k][l], x) <
     317            degree (storeFactors[i][0][k][l+1], x))
     318        {
     319          seperator[i][k][count]=l + 1;
     320          count++;
     321        }
     322      }
     323      seperator [i][k][count]= storeFactors[i][0][k].size();
     324    }
     325  }
     326
     327  CanonicalForm tmp1, factor, quot;
     328  CanonicalForm B= A;
     329  CFList result;
     330  int maxTerms, n, index1, index2, mmm, found, columns, oneCount;
     331  int ** mat;
     332
     333  for (k= 0; k < minFactorsLength; k++)
     334  {
     335    factor= 0;
     336    sizeOfUniFactors= seperator [0][k][0];
     337    for (n= 1; n <= sizeOfUniFactors; n++)
     338    {
     339      columns= 0;
     340      maxTerms= 1;
     341      index1= j - 1;
     342      for (i= j - 1; i >= 0; i--)
     343      {
     344        if (maxTerms < seperator[i][k][n+1]-seperator[i][k][n])
     345        {
     346          maxTerms= seperator[i][k][n + 1]-seperator[i][k][n];
     347          index1= i;
     348        }
     349      }
     350      for (i= j - 1; i >= 0; i--)
     351      {
     352        if (i == index1)
     353          continue;
     354        columns += seperator [i][k][n+1]-seperator[i][k][n];
     355      }
     356      mat= new int *[maxTerms];
     357      mm= 0;
     358      for (m= seperator[index1][k][n]; m < seperator[index1][k][n+1]; m++, mm++)
     359      {
     360        tmp1= storeFactors [index1][1][k][m];
     361        mat[mm]= new int [columns];
     362        for (i= 0; i < columns; i++)
     363          mat[mm][i]= 0;
     364        index2= 0;
     365        for (i= j - 1; i >= 0; i--)
     366        {
     367          if (i == index1)
     368            continue;
     369          found= -1;
     370          if ((found= search (storeFactors[i][1][k], tmp1,
     371                              seperator[i][k][n], seperator[i][k][n+1])) >= 0)
     372            mat[mm][index2 + found - seperator [i][k][n]]= 1;
     373          index2 += seperator [i][k][n+1]-seperator[i][k][n];
     374        }
     375      }
     376
     377      index2= 0;
     378      for (i= j - 1; i >= 0; i--)
     379      {
     380        if (i == index1)
     381          continue;
     382        oneCount= 0;
     383        for (mm= 0; mm < seperator [i][k][n + 1] - seperator [i][k][n]; mm++)
     384        {
     385          for (m= 0; m < maxTerms; m++)
     386          {
     387            if (mat[m][mm+index2] == 1)
     388              oneCount++;
     389          }
     390        }
     391        if (oneCount == seperator [i][k][n+1]-seperator[i][k][n] - 1)
     392        {
     393          for (mm= 0; mm < seperator [i][k][n+1]-seperator[i][k][n]; mm++)
     394          {
     395            oneCount= 0;
     396            for (m= 0; m < maxTerms; m++)
     397              if (mat[m][mm+index2] == 1)
     398                oneCount++;
     399            if (oneCount > 0)
     400              continue;
     401            for (m= 0; m < maxTerms; m++)
     402            {
     403              oneCount= 0;
     404              for (mmm= 0; mmm < seperator[i][k][n+1]-seperator[i][k][n]; mmm++)
     405              {
     406                if (mat[m][mmm+index2] == 1)
     407                  oneCount++;
     408              }
     409              if (oneCount > 0)
     410                continue;
     411              mat[m][mm+index2]= 1;
     412            }
     413          }
     414        }
     415        index2 += seperator [i][k][n+1] - seperator [i][k][n];
     416      }
     417
     418      //read off solution
     419      mm= 0;
     420      for (m= seperator[index1][k][n]; m < seperator[index1][k][n+1]; m++, mm++)
     421      {
     422        tmp1= storeFactors [index1][0][k][m];
     423        index2= 0;
     424        for (i= j - 1; i > -1; i--)
     425        {
     426          if (i == index1)
     427            continue;
     428          for (mmm= 0; mmm < seperator [i][k][n+1]-seperator[i][k][n]; mmm++)
     429            if (mat[mm][mmm+index2] == 1)
     430              tmp1= patch (tmp1, storeFactors[i][0][k][seperator[i][k][n]+mmm],
     431                           eval[i]);
     432          index2 += seperator [i][k][n+1]-seperator[i][k][n];
     433        }
     434        factor += tmp1;
     435      }
     436
     437      for (m= 0; m < maxTerms; m++)
     438        delete [] mat [m];
     439      delete [] mat;
     440    }
     441
     442    if (fdivides (factor, B, quot))
     443    {
     444      result.append (factor);
     445      B= quot;
     446      if (result.length() == biFactors.length() - 1)
     447      {
     448        result.append (quot);
     449        break;
     450      }
     451    }
     452  }
     453
     454  //delete
     455  for (i= 0; i < j; i++)
     456  {
     457    delete [] storeFactors [i] [0];
     458    delete [] storeFactors [i] [1];
     459    delete [] storeFactors [i];
     460    for (k= 0; k < minFactorsLength; k++)
     461      delete [] seperator [i][k];
     462    delete [] seperator [i];
     463  }
     464  delete [] seperator;
     465  delete [] storeFactors;
     466  //
     467
     468  return result;
     469}
    41470
    42471static inline
     
    24192848  else if (biFactors.length() > minFactorsLength)
    24202849    refineBiFactors (A, biFactors, Aeval2, evaluation, minFactorsLength);
     2850  minFactorsLength= tmin (minFactorsLength, biFactors.length());
     2851
     2852  if (differentSecondVar == A.level() - 2)
     2853  {
     2854    bool zeroOccured= false;
     2855    for (CFListIterator iter= evaluation; iter.hasItem(); iter++)
     2856    {
     2857      if (iter.getItem().isZero())
     2858      {
     2859        zeroOccured= true;
     2860        break;
     2861      }
     2862    }
     2863    if (!zeroOccured)
     2864    {
     2865      factors= sparseHeuristic (A, biFactors, Aeval2, evaluation, minFactorsLength);
     2866      if (factors.length() == biFactors.length())
     2867      {
     2868        if (extension)
     2869          factors= extNonMonicFactorRecombination (factors, A, info);
     2870
     2871        appendSwapDecompress (factors, contentAFactors, N, swapLevel,
     2872                              swapLevel2, x);
     2873        normalize (factors);
     2874        delete [] Aeval2;
     2875        return factors;
     2876      }
     2877      else
     2878        factors= CFList();
     2879      //TODO case where factors.length() > 0
     2880    }
     2881  }
    24212882
    24222883  CFList uniFactors= buildUniFactors (biFactors, evaluation.getLast(), y);
  • factory/facFqFactorize.h

    r7d58b6 r6036d90  
    551551             );
    552552
     553/// heuristic algorithm for lifting sparse polynomials
     554///
     555/// @return a list of factors of A, possibly incomplete
     556CFList
     557sparseHeuristic (const CanonicalForm& A,  ///<[in] polynomial to be factored
     558                 const CFList& biFactors, ///<[in] list of bivariate factors wrt
     559                                          ///< Variable 1 and 2
     560                 CFList*& moreBiFactors,  ///<[in,out] more bivariate factors
     561                                          ///< wrt different second variables.
     562                                          ///< May be recombined s.t. there are
     563                                          ///< only minFactorsLength factors and
     564                                          ///< resorted s.t. the sequence of
     565                                          ///< univariate factors in biFactors
     566                                          ///< and moreBiFactors coincides
     567                 const CFList& evaluation,///<[in] evaluation point
     568                 int minFactorsLength     ///<[in] minimal number of factors
     569                );
     570
    553571#endif
    554572/* FAC_FQ_FACTORIZE_H */
Note: See TracChangeset for help on using the changeset viewer.