Ignore:
Timestamp:
Mar 7, 2014, 1:58:26 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
Children:
40227ae7c2daf35e8c370108cbc9726d208d6ba8
Parents:
ba613995ddff08ba13beb2499b6e5336d7ecb483
git-author:
Martin Lee <martinlee84@web.de>2014-03-07 13:58:26+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2014-03-17 18:31:53+01:00
Message:
chg: added function to determine multiplicity of factors
File:
1 edited

Legend:

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

    rba6139 re0fbbeb  
    634634}
    635635
     636void
     637multiplicity (CFFList& factors, const CanonicalForm& F, const CFList& as)
     638{
     639  CanonicalForm G= F;
     640  Variable x= F.mvar();
     641  CanonicalForm q, r;
     642  int count= -1;
     643  On (SW_RATIONAL);
     644  for (CFFListIterator iter=factors; iter.hasItem(); iter++)
     645  {
     646    count= -1;
     647    if (iter.getItem().factor().inCoeffDomain())
     648      continue;
     649    while (1)
     650    {
     651      psqr (G, iter.getItem().factor(), q, r, x);
     652
     653      q= Prem (q, as);
     654      r= Prem (r, as);
     655      if (!r.isZero())
     656        break;
     657      On (SW_RATIONAL);
     658      count++;
     659      G= q;
     660    }
     661    iter.getItem()= CFFactor (iter.getItem().factor(), iter.getItem().exp()+count);
     662  }
     663}
     664
    636665
    637666// 1) prepares data
Note: See TracChangeset for help on using the changeset viewer.