Changeset e5739a in git for Singular/pcv.cc
 Timestamp:
 Aug 10, 2011, 3:23:07 PM (12 years ago)
 Branches:
 (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
 Children:
 3705cd9bb524607a0a68e71450ae458b8cb98e69
 Parents:
 cffea8fb2ce6cb469ccc7bfd37d9ad5452f1c67a
 gitauthor:
 Burcin Erocal <burcin@erocal.org>20110810 15:23:07+02:00
 gitcommitter:
 Mohamed Barakat <mohamed.barakat@rwthaachen.de>20111109 13:17:27+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/pcv.cc
rcffea8f re5739a 107 107 { 108 108 int d=0; 109 for(int i= pVariables;i>=1;i) d+=pGetExp(p,i);109 for(int i=currRing>N;i>=1;i) d+=pGetExp(p,i); 110 110 return d; 111 111 } … … 166 166 if(d<0) d=1; 167 167 pcvMaxDegree=d+1; 168 pcvTableSize= pVariables*pcvMaxDegree*sizeof(unsigned);168 pcvTableSize=currRing>N*pcvMaxDegree*sizeof(unsigned); 169 169 pcvTable=(unsigned*)omAlloc0(pcvTableSize); 170 pcvIndexSize= pVariables*sizeof(unsigned*);170 pcvIndexSize=currRing>N*sizeof(unsigned*); 171 171 pcvIndex=(unsigned**)omAlloc(pcvIndexSize); 172 for(int i=0;i< pVariables;i++)172 for(int i=0;i<currRing>N;i++) 173 173 pcvIndex[i]=pcvTable+i*pcvMaxDegree; 174 174 for(int i=0;i<pcvMaxDegree;i++) 175 175 pcvIndex[0][i]=i; 176 176 unsigned k,l; 177 for(int i=1;i< pVariables;i++)177 for(int i=1;i<currRing>N;i++) 178 178 { 179 179 k=0; … … 184 184 { 185 185 j=pcvMaxDegree; 186 i= pVariables;186 i=currRing>N; 187 187 WerrorS("unsigned overflow"); 188 188 } … … 209 209 { 210 210 unsigned n=0,dn,d=0; 211 for(int i=0;i< pVariables;i++)211 for(int i=0;i<currRing>N;i++) 212 212 { 213 213 d+=pGetExp(m,i+1); … … 215 215 if(dn>INT_MAXn) 216 216 { 217 i= pVariables;217 i=currRing>N; 218 218 WerrorS("component overflow"); 219 219 } … … 228 228 poly m=pOne(); 229 229 int i,j=0,k; 230 for(i= pVariables1;i>=0;i)230 for(i=currRing>N1;i>=0;i) 231 231 { 232 232 k=j; … … 234 234 j; 235 235 n=pcvIndex[i][j]; 236 if(i< pVariables1) pSetExp(m,i+2,kj);236 if(i<currRing>N1) pSetExp(m,i+2,kj); 237 237 } 238 238 if(n==0) … … 381 381 if(d1<0) d1=0; 382 382 pcvInit(d1); 383 int d=pcvIndex[ pVariables1][d1]pcvIndex[pVariables1][d0];383 int d=pcvIndex[currRing>N1][d1]pcvIndex[currRing>N1][d0]; 384 384 pcvClean(); 385 385 return d; … … 411 411 int pcvBasis(lists b,int i,poly m,int d,int n) 412 412 { 413 if(n< pVariables)413 if(n<currRing>N) 414 414 { 415 415 for(int k=0,l=d;k<=l;k++,d)
Note: See TracChangeset
for help on using the changeset viewer.