Changeset 2f6b737 in git


Ignore:
Timestamp:
Mar 20, 2012, 11:47:05 AM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b21a664aa22dc6e196223af8a74ad4885e83547c')
Children:
92add1cbf7a1569ca2508231958e203c89782aa3
Parents:
f531208030784e843b7f5770d9d741e9ebc8260a
git-author:
Martin Lee <martinlee84@web.de>2012-03-20 11:47:05+01:00
git-committer:
Martin Lee <martinlee84@web.de>2012-04-04 14:42:27+02:00
Message:
fix: getTerms2 and patch for coeffs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facSparseHensel.h

    rf53120 r2f6b737  
    412412getTerms2 (const CanonicalForm& F)
    413413{
     414  if (F.inCoeffDomain())
     415  {
     416    CFArray result= CFArray (1);
     417    result[0]= F;
     418    return result;
     419  }
    414420  CFArray result= CFArray (size (F));
    415421  int j= 0;
     
    419425  for (CFIterator i= F; i.hasTerms(); i++)
    420426  {
    421     for (k= i.coeff(); k.hasTerms(); k++, j++)
    422       result[j]= k.coeff()*power (x,i.exp())*power (y,k.exp());
     427    if (i.coeff().inCoeffDomain())
     428    {
     429      result[j]= i.coeff()*power (x,i.exp());
     430      j++;
     431    }
     432    else
     433    {
     434      for (k= i.coeff(); k.hasTerms(); k++, j++)
     435        result[j]= k.coeff()*power (x,i.exp())*power (y,k.exp());
     436    }
    423437  }
    424438  sort (result);
     
    485499{
    486500  CanonicalForm result= F1;
    487   if (F2.level() != 1)
     501  if (F2.level() != 1 && !F2.inCoeffDomain())
    488502  {
    489503    int d= degree (F2);
Note: See TracChangeset for help on using the changeset viewer.