Changeset 5f4e0e in git


Ignore:
Timestamp:
Mar 10, 2014, 3:28:59 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
0aa5d5341e6004e6426fabd0fb0a1f19f6bd7eb4
Parents:
d21c2cb52c17b8ca70c95d559d91d0d074c00a7e
git-author:
Martin Lee <martinlee84@web.de>2014-03-10 15:28:59+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2014-03-17 18:31:54+01:00
Message:
chg: added 'subst' to substitute alg. variables in f by their
 image in the absolute extension
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/libfac/charset/alg_factor.cc

    rd21c2c r5f4e0e  
    696696  //assert(f.inCoeffDomain());
    697697  return f;
     698}
     699
     700CanonicalForm
     701subst (const CanonicalForm& f, const CFList& a, const CFList& b,
     702       const CanonicalForm& Rstar, bool isFunctionField)
     703{
     704  if (isFunctionField)
     705    ASSERT (2*a.length() == b.length(), "wrong length of lists");
     706  else
     707    ASSERT (a.length() == b.length(), "lists of equal length expected");
     708  CFListIterator j= b;
     709  CanonicalForm result= f, tmp, powj;
     710  for (CFListIterator i= a; i.hasItem() && j.hasItem(); i++, j++)
     711  {
     712    if (!isFunctionField)
     713      result= result (j.getItem(), i.getItem().mvar());
     714    else
     715    {
     716      tmp= j.getItem();
     717      j++;
     718      powj= power (j.getItem(), degree (result, i.getItem().mvar()));
     719      result= evaluate (result, tmp, j.getItem(), powj, i.getItem().mvar());
     720
     721      if (fdivides (powj, result, tmp))
     722        result= tmp;
     723
     724      result /= vcontent (result, Variable (i.getItem().level() + 1));
     725    }
     726  }
     727  result= reduce (result, Rstar);
     728  result /= vcontent (result, Variable (Rstar.level() + 1));
     729  return result;
    698730}
    699731
Note: See TracChangeset for help on using the changeset viewer.