Changeset 1af36f5 in tol


Ignore:
Timestamp:
Mar 26, 2013, 10:35:01 AM (14 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
8406afd
Parents:
98778a7
Message:

Fixes #1644

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@5705 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/polynomial_type/polgra.cpp

    r98778a7 r1af36f5  
    644644//--------------------------------------------------------------------
    645645{
    646     BPol pol = Pol(Arg(1));
    647     BInt m   = (BInt)Real(Arg(2));
    648     BInt M   = (BInt)Real(Arg(3));
    649     contens_.ReallocBuffer(M - m + 1);
     646  BPol pol = Pol(Arg(1));
     647  BInt m   = (BInt)Real(Arg(2));
     648  BInt M   = (BInt)Real(Arg(3));
     649  contens_.ReallocBuffer(M - m + 1);
    650650//Std(BText("\ns=")+s+" n="+n);
    651     BInt k, j;
    652     for(k=j=0; k<pol.Size(); k++)
     651  BInt k, j;
     652  for(k=j=0; k<pol.Size(); k++)
     653  {
     654    BInt d  = pol[k].Degree();
     655//  Std(BText("\nMonome ")+k+" : "+d+"%" + s + "=" +(d%s));
     656    if((d>=m) && (d<=M))
    653657    {
    654         BInt d  = pol[k].Degree();
    655 //  Std(BText("\nMonome ")+k+" : "+d+"%" + s + "=" +(d%s));
    656         if((d>=m) && (d<=M))
    657         {
    658658//    Std(BText("\t -> Adding ")+j+ " : " +(d/s));
    659             contens_[j].PutDegree(d);
    660             contens_[j].PutCoef  (pol[k].Coef());
    661             j++;
    662         }
     659      contens_[j].PutDegree(d);
     660      contens_[j].PutCoef  (pol[k].Coef());
     661      j++;
    663662    }
     663  }
     664  if(j==0)
     665  {
     666    contens_ = BPol::Zero();
     667  }
     668  else
     669  {
    664670    contens_.ReallocBuffer(j);   
     671  }
    665672}
    666673
Note: See TracChangeset for help on using the changeset viewer.