Changeset d8e71a in git
- Timestamp:
- Aug 25, 2022, 11:43:42 AM (20 months ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- aaa2126025a96fdc04e3b30a2afd09f23a3bd228
- Parents:
- 2d1047928fc91699976942d5b18b0096edd8439e
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
r2d10479 rd8e71a 3971 3971 const short t5[]={2,VECTOR_CMD,POLY_CMD}; 3972 3972 const short t6[]={2,MODUL_CMD,POLY_CMD}; 3973 const short t7[]={2,VECTOR_CMD,IDEAL_CMD}; 3973 3974 if (iiCheckTypes(h,t1,0) 3974 3975 || iiCheckTypes(h,t2,0)) … … 4003 4004 res->data=id_CoeffTermV(p,q,currRing); 4004 4005 res->rtyp=MODUL_CMD; 4006 return FALSE; 4007 } 4008 else if (iiCheckTypes(h,t7,0)) /* vector,ideal*/ 4009 { 4010 poly p=(poly)h->Data(); 4011 ideal q=(ideal)h->next->Data(); 4012 res->data=p_CoeffTermId(p,q,p_MaxComp(p,currRing),currRing); 4013 res->rtyp=VECTOR_CMD; 4005 4014 return FALSE; 4006 4015 } -
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 -
libpolys/polys/pCoeff.h
r2d10479 rd8e71a 30 30 /// find coeffs of (polynomial) m in all vectors from I 31 31 ideal id_CoeffTermV(ideal M, poly m, const ring r); 32 33 /// find coeffs of a vector of a list of given monomials, n>=max_comp(v) 34 poly p_CoeffTermId(poly v, ideal m, int n, const ring r); 32 35 #endif
Note: See TracChangeset
for help on using the changeset viewer.