Changeset 8316b0 in git for libpolys/polys


Ignore:
Timestamp:
Sep 6, 2022, 2:07:08 PM (20 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
9487e9aedf3f8533bbf8ca861dae3f53b4dd9c4e
Parents:
61b23dbd8490ceddb7e3db6a82bba09eff76d347
Message:
add system("CoeffTerm",<vector>,<module>)
Location:
libpolys/polys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/pCoeff.cc

    r61b23db r8316b0  
    110110}
    111111
     112/// find coeffs of a vector of a matrix(module) of given monomials, n>=max_comp(v)
     113poly p_CoeffTermMo(poly v, ideal m, int n, const ring r)
     114{
     115  poly res=NULL;
     116  for(int i=0;i<IDELEMS(m);i++)
     117  {
     118    ideal mm=id_Vec2Ideal(m->m[i],r);
     119    poly tmp=p_CoeffTermId(v,mm,n,r);
     120    if (i>0)
     121    {
     122      p_Shift(&tmp,m->rank,r); // m->rank >= p_MaxComp(m->m[i-1],r)
     123      res=p_Add_q(res,tmp,r);
     124    }
     125    else
     126      res=tmp;
     127  }
     128  return res;
     129}
  • libpolys/polys/pCoeff.h

    r61b23db r8316b0  
    3333/// find coeffs of a vector of a list of given monomials, n>=max_comp(v)
    3434poly p_CoeffTermId(poly v, ideal m, int n, const ring r);
     35
     36/// find coeffs of a vector of a matrix(as module) of given monomials, n>=max_comp(v)
     37poly p_CoeffTermMo(poly v, ideal m, int n, const ring r);
    3538#endif
Note: See TracChangeset for help on using the changeset viewer.