Changeset d8e71a in git for libpolys/polys/pCoeff.cc
- Timestamp:
- Aug 25, 2022, 11:43:42 AM (21 months ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
- Children:
- aaa2126025a96fdc04e3b30a2afd09f23a3bd228
- Parents:
- 2d1047928fc91699976942d5b18b0096edd8439e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/pCoeff.cc
r2d10479 rd8e71a 82 82 return res; 83 83 } 84 85 /// find coeffs of a vector of a list of given monomials, n>=max_comp(v) 86 poly p_CoeffTermId(poly v, ideal m, int n, const ring r) 87 { 88 if ((n<=0)||(v==NULL)) return NULL; 89 poly q; 90 poly u=NULL; 91 int dummy; 92 const int ncols_m=IDELEMS(m); 93 v=p_Copy(v,r); 94 for(int i=1;i<=n;i++) 95 { 96 p_TakeOutComp(&v,i,&q,&dummy,r); 97 for(int j=0;j<ncols_m;j++) 98 { 99 number n=p_CoeffTerm(q,m->m[j],r); 100 poly uu=p_NSet(n,r); 101 if (uu!=NULL) 102 { 103 p_SetComp(uu,(i-1)*ncols_m+j+1,r); 104 u=p_Add_q(u,uu,r); 105 } 106 } 107 if (v==NULL) break; 108 } 109 return u; 110 } 111
Note: See TracChangeset
for help on using the changeset viewer.