Changeset 7e30dd in git
- Timestamp:
- Mar 5, 2001, 5:41:49 PM (22 years ago)
- Branches:
- (u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
- Children:
- 3be21912509b9d0d48aa864b1627f831fad50bf6
- Parents:
- 07a268cace99ce7229a8b6c651fab8f17e3e5931
- Location:
- Singular
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ideals.cc
r07a268 r7e30dd 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.12 3 2001-02-27 18:06:34mschulze Exp $ */4 /* $Id: ideals.cc,v 1.124 2001-03-05 16:41:47 mschulze Exp $ */ 5 5 /* 6 6 * ABSTRACT - all basic methods to manipulate ideals … … 2905 2905 } 2906 2906 2907 int idMinDeg W(ideal M,intvec *w)2907 int idMinDeg(ideal M,intvec *w) 2908 2908 { 2909 2909 int d=-1; 2910 2910 for(int i=0;i<IDELEMS(M);i++) 2911 2911 { 2912 int d0=pMinDeg W(M->m[i],w);2912 int d0=pMinDeg(M->m[i],w); 2913 2913 if(-1<d0&&(d0<d||d==-1)) 2914 2914 d=d0; … … 2917 2917 } 2918 2918 2919 ideal idSeries(int n,ideal M,matrix U=NULL )2919 ideal idSeries(int n,ideal M,matrix U=NULL,intvec *w=NULL) 2920 2920 { 2921 2921 for(int i=IDELEMS(M)-1;i>=0;i--) 2922 2922 { 2923 2923 if(U==NULL) 2924 M->m[i]=pSeries(n,M->m[i] );2924 M->m[i]=pSeries(n,M->m[i],NULL,w); 2925 2925 else 2926 2926 { 2927 M->m[i]=pSeries(n,M->m[i],MATELEM(U,i+1,i+1) );2927 M->m[i]=pSeries(n,M->m[i],MATELEM(U,i+1,i+1),w); 2928 2928 MATELEM(U,i+1,i+1)=NULL; 2929 2929 } -
Singular/ideals.h
r07a268 r7e30dd 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: ideals.h,v 1.3 3 2001-02-27 18:06:34mschulze Exp $ */6 /* $Id: ideals.h,v 1.34 2001-03-05 16:41:48 mschulze Exp $ */ 7 7 /* 8 8 * ABSTRACT - all basic methods to manipulate ideals … … 129 129 ideal idJet(ideal i,int d); 130 130 ideal idJetW(ideal i,int d, intvec * iv); 131 int idMinDeg W(ideal M,intvec *w);132 ideal idSeries(int n,ideal M,matrix U=NULL );131 int idMinDeg(ideal M,intvec *w=NULL); 132 ideal idSeries(int n,ideal M,matrix U=NULL,intvec *w=NULL); 133 133 134 134 BOOLEAN idIsZeroDim(ideal i); -
Singular/polys.h
r07a268 r7e30dd 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: polys.h,v 1.5 5 2001-02-27 18:06:35mschulze Exp $ */6 /* $Id: polys.h,v 1.56 2001-03-05 16:41:49 mschulze Exp $ */ 7 7 /* 8 8 * ABSTRACT - all basic methods to manipulate polynomials of the … … 403 403 poly pJet(poly p, int m); 404 404 poly ppJetW(poly p, int m, short * iv); 405 int pMinDegW(poly p,intvec *w); 406 poly pSeries(int n,poly p,poly u=NULL); 407 poly pInvers(int n, poly p); 405 poly pJetW(poly p, int m, short * iv); 406 int pMinDeg(poly p,intvec *w=NULL); 407 poly pSeries(int n,poly p,poly u=NULL,intvec *w=NULL); 408 poly pInvers(int n, poly p,intvec *w=NULL); 408 409 // maximum weigthed degree of all monomials of p, w is indexed from 409 410 // 1..pVariables -
Singular/polys1.cc
r07a268 r7e30dd 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys1.cc,v 1.6 5 2001-02-27 18:06:35mschulze Exp $ */4 /* $Id: polys1.cc,v 1.66 2001-03-05 16:41:48 mschulze Exp $ */ 5 5 6 6 /* … … 1158 1158 poly t=NULL; 1159 1159 short *wsave=ecartWeights; 1160 1161 1160 ecartWeights=w; 1162 1163 1161 while (p!=NULL) 1164 1162 { … … 1185 1183 } 1186 1184 1187 int pMinDegW(poly p,intvec *w) 1185 poly pJetW(poly p, int m, short *w) 1186 { 1187 poly t=NULL; 1188 short *wsave=ecartWeights; 1189 ecartWeights=w; 1190 while((p!=NULL) && (totaldegreeWecart(p)>m)) pLmDelete(&p); 1191 if (p==NULL) return NULL; 1192 poly r=p; 1193 while (pNext(p)!=NULL) 1194 { 1195 if (totaldegreeWecart(pNext(p))>m) 1196 { 1197 pLmDelete(&pNext(p)); 1198 } 1199 else 1200 pIter(p); 1201 } 1202 ecartWeights=wsave; 1203 return r; 1204 } 1205 1206 int pMinDeg(poly p,intvec *w=NULL) 1188 1207 { 1189 1208 if(p==NULL) 1190 1209 return -1; 1191 int n=0;1192 if(w!=NULL)1193 n=w->length();1194 if(pVariables<n)1195 n=pVariables;1196 1210 int d=-1; 1197 1211 while(p!=NULL) 1198 1212 { 1199 1213 int d0=0; 1200 for(int j=0;j<n;j++) 1201 d0+=(*w)[j]*pGetExp(p,j+1); 1214 for(int j=0;j<pVariables;j++) 1215 if(w==NULL||j>=w->length()) 1216 d0+=pGetExp(p,j+1); 1217 else 1218 d0+=(*w)[j]*pGetExp(p,j+1); 1202 1219 if(d0<d||d==-1) 1203 1220 d=d0; … … 1207 1224 } 1208 1225 1209 poly pSeries(int n,poly p,poly u=NULL) 1210 { 1226 poly pSeries(int n,poly p,poly u=NULL,intvec *w=NULL) 1227 { 1228 short *ww=iv2array(w); 1211 1229 if(p!=NULL) 1212 1230 { 1213 1231 if(u==NULL) 1214 p=pJet (p,n);1232 p=pJetW(p,n,ww); 1215 1233 else 1216 p=pJet(pMult(p,pInvers(n-pTotaldegree(p),u)),n); 1217 } 1234 p=pJetW(pMult(p,pInvers(n-pMinDeg(p,w),u,w)),n,ww); 1235 } 1236 omFreeSize((ADDRESS)ww,(pVariables+1)*sizeof(short)); 1218 1237 return p; 1219 1238 } 1220 1239 1221 poly pInvers(int n,poly u) 1222 { 1240 poly pInvers(int n,poly u,intvec *w) 1241 { 1242 short *ww=iv2array(w); 1223 1243 if(n<0) 1224 1244 return NULL; … … 1227 1247 if(n==0) 1228 1248 return v; 1229 poly u1=pJet (pSub(pOne(),pMult_nn(u,u0)),n);1249 poly u1=pJetW(pSub(pOne(),pMult_nn(u,u0)),n,ww); 1230 1250 if(u1==NULL) 1231 1251 return v; 1232 1252 poly v1=pMult_nn(pCopy(u1),u0); 1233 1253 v=pAdd(v,pCopy(v1)); 1234 for(int i=n/p Totaldegree(u1);i>1;i--)1235 { 1236 v1=pJet (pMult(v1,pCopy(u1)),n);1254 for(int i=n/pMinDeg(u1,w);i>1;i--) 1255 { 1256 v1=pJetW(pMult(v1,pCopy(u1)),n,ww); 1237 1257 v=pAdd(v,pCopy(v1)); 1238 1258 } 1239 1259 pDelete(&u1); 1240 1260 pDelete(&v1); 1261 omFreeSize((ADDRESS)ww,(pVariables+1)*sizeof(short)); 1241 1262 return v; 1242 1263 }
Note: See TracChangeset
for help on using the changeset viewer.