Changeset 6af78bb in git


Ignore:
Timestamp:
Aug 10, 2012, 11:49:12 AM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '96ce329119711a2b80858c8365abd29f8460bbfa')
Children:
8797746f0462992c4a00f27f0837b923a3f847de
Parents:
1a2d6611738ea83b676a2b906a53986d841f8957
git-author:
Martin Lee <martinlee84@web.de>2012-08-10 11:49:12+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-09-04 18:01:17+02:00
Message:
chg: minor optimization
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFactorize.cc

    r1a2d66 r6af78bb  
    920920  A /= hh;
    921921
     922  CFListIterator iter2;
    922923  CFList bufFactors= CFList();
    923924  if (LucksWangSparseHeuristic (A, biFactors, 2, leadingCoeffs2 [A.level() - 3],
     
    975976      CanonicalForm cont;
    976977      CFList contents, LCs;
    977       CFListIterator iter2;
    978978      int index=1;
    979979      bool foundTrueMultiplier= false;
     
    12001200
    12011201  CFList commonDenominators;
    1202   for (CFListIterator iter=biFactors; iter.hasItem(); iter++)
     1202  for (iter=biFactors; iter.hasItem(); iter++)
    12031203    commonDenominators.append (bCommonDen (iter.getItem()));
    12041204  CanonicalForm tmp1, tmp2, tmp3=1;
    1205   CFListIterator iter1, iter2;
    12061205  for (int i= 0; i < A.level() - 2; i++)
    12071206  {
    12081207    iter2= commonDenominators;
    1209     for (iter1= leadingCoeffs2[i]; iter1.hasItem(); iter1++, iter2++)
    1210     {
    1211       tmp1= bCommonDen (iter1.getItem());
     1208    for (iter= leadingCoeffs2[i]; iter.hasItem(); iter++, iter2++)
     1209    {
     1210      tmp1= bCommonDen (iter.getItem());
    12121211      Off (SW_RATIONAL);
    12131212      iter2.getItem()= lcm (iter2.getItem(), tmp1);
     
    12161215  }
    12171216  tmp1= prod (commonDenominators);
    1218   for (iter1= Aeval; iter1.hasItem(); iter1++)
    1219   {
    1220     tmp2= bCommonDen (iter1.getItem());
     1217  for (iter= Aeval; iter.hasItem(); iter++)
     1218  {
     1219    tmp2= bCommonDen (iter.getItem());
    12211220    Off (SW_RATIONAL);
    12221221    tmp3= lcm (tmp2,tmp3);
     
    12261225  multiplier= tmp3/tmp1;
    12271226  iter2= commonDenominators;
    1228   for (iter1=biFactors; iter1.hasItem(); iter1++, iter2++)
    1229     iter1.getItem() *= iter2.getItem()*multiplier;
    1230 
    1231   for (iter1= Aeval; iter1.hasItem(); iter1++)
    1232     iter1.getItem() *= tmp3*power (multiplier, biFactors.length() - 1);
     1227  for (iter=biFactors; iter.hasItem(); iter++, iter2++)
     1228    iter.getItem() *= iter2.getItem()*multiplier;
     1229
     1230  for (iter= Aeval; iter.hasItem(); iter++)
     1231    iter.getItem() *= tmp3*power (multiplier, biFactors.length() - 1);
    12331232
    12341233  for (int i= 0; i < A.level() - 2; i++)
    12351234  {
    12361235    iter2= commonDenominators;
    1237     for (iter1= leadingCoeffs2[i]; iter1.hasItem(); iter1++, iter2++)
    1238       iter1.getItem() *= iter2.getItem()*multiplier;
     1236    for (iter= leadingCoeffs2[i]; iter.hasItem(); iter++, iter2++)
     1237      iter.getItem() *= iter2.getItem()*multiplier;
    12391238  }
    12401239
Note: See TracChangeset for help on using the changeset viewer.