Changeset ed5c8d in git
- Timestamp:
- Mar 23, 2010, 5:27:44 PM (13 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 0b5e3dd93463040bd0598ca2fa8cf650782a715f
- Parents:
- 89ca47fb0e392b149b888b5746e539030d6a2226
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/sparsmat.cc
r89ca47 red5c8d 33 33 #define SM_MIN_LENGTH_BUCKET INT_MAX 34 34 #endif 35 36 typedef struct smprec sm_prec; 37 typedef sm_prec * smpoly; 38 struct smprec 39 { 40 smpoly n; // the next element 41 int pos; // position 42 int e; // level 43 poly m; // the element 44 float f; // complexity of the element 45 }; 35 46 36 47 … … 164 175 * we have di,ra >= t 165 176 */ 166 static void smMinSelect( Exponent_t*, int, int);167 Exponent_tsmExpBound( ideal m, int di, int ra, int t)177 static void smMinSelect(long *, int, int); 178 long smExpBound( ideal m, int di, int ra, int t) 168 179 { 169 180 poly p; 170 Exponent_tkr, kc;171 Exponent_t*r, *c;181 long kr, kc; 182 long *r, *c; 172 183 int al, bl, i, j, k; 173 184 174 185 if (ra==0) ra=1; 175 al = di*sizeof( Exponent_t);176 c = ( Exponent_t*)omAlloc(al);177 bl = ra*sizeof( Exponent_t);178 r = ( Exponent_t*)omAlloc0(bl);186 al = di*sizeof(long); 187 c = (long *)omAlloc(al); 188 bl = ra*sizeof(long); 189 r = (long *)omAlloc0(bl); 179 190 for (i=di-1;i>=0;i--) 180 191 { … … 212 223 } 213 224 214 static void smMinSelect( Exponent_t*c, int t, int d)215 { 216 Exponent_tm;225 static void smMinSelect(long *c, int t, int d) 226 { 227 long m; 217 228 int pos, i; 218 229 do … … 234 245 235 246 /* ----------------- ops with rings ------------------ */ 236 void smRingChange(ring *origR, sip_sring &tmpR, Exponent_tbound)247 void smRingChange(ring *origR, sip_sring &tmpR, long bound) 237 248 { 238 249 *origR =currRing; … … 339 350 return NULL; 340 351 } 341 Exponent_tbound=smExpBound(I,r,r,r);352 long bound=smExpBound(I,r,r,r); 342 353 number diag,h=nInit(1); 343 354 poly res; … … 379 390 int r=idRankFreeModule(I),t=r; 380 391 int c=IDELEMS(I),s=c; 381 Exponent_tbound;392 long bound; 382 393 ring origR; 383 394 sip_sring tmpR; … … 418 429 int r=idRankFreeModule(I),t=r; 419 430 int c=IDELEMS(I),s=c; 420 Exponent_tbound;431 long bound; 421 432 ring origR; 422 433 sip_sring tmpR; … … 2351 2362 poly pp; 2352 2363 smpoly res, a; 2353 Exponent_tx;2364 long x; 2354 2365 2355 2366 if (q == NULL) … … 2388 2399 smpoly b; 2389 2400 poly res, pp, q; 2390 Exponent_tx;2401 long x; 2391 2402 2392 2403 if (a == NULL) -
kernel/structs.h
r89ca47 red5c8d 73 73 74 74 75 typedef long Exponent_t;76 77 75 enum tHomog 78 76 { … … 201 199 typedef struct p_Procs_s p_Procs_s; 202 200 203 // for sparsemat.cc204 typedef struct smprec sm_prec;205 typedef sm_prec * smpoly;206 struct smprec207 {208 smpoly n; // the next element209 int pos; // position210 int e; // level211 poly m; // the element212 float f; // complexity of the element213 };214 215 201 struct n_Procs_s 216 202 {
Note: See TracChangeset
for help on using the changeset viewer.