Changeset ed5c8d in git


Ignore:
Timestamp:
Mar 23, 2010, 5:27:44 PM (13 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
0b5e3dd93463040bd0598ca2fa8cf650782a715f
Parents:
89ca47fb0e392b149b888b5746e539030d6a2226
Message:
smpoly moved to sparsemat.cc

git-svn-id: file:///usr/local/Singular/svn/trunk@12663 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/sparsmat.cc

    r89ca47 red5c8d  
    3333#define SM_MIN_LENGTH_BUCKET    INT_MAX
    3434#endif
     35
     36typedef struct smprec sm_prec;
     37typedef sm_prec * smpoly;
     38struct 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};
    3546
    3647
     
    164175* we have di,ra >= t
    165176*/
    166 static void smMinSelect(Exponent_t *, int, int);
    167 Exponent_t smExpBound( ideal m, int di, int ra, int t)
     177static void smMinSelect(long *, int, int);
     178long smExpBound( ideal m, int di, int ra, int t)
    168179{
    169180  poly p;
    170   Exponent_t kr, kc;
    171   Exponent_t *r, *c;
     181  long kr, kc;
     182  long *r, *c;
    172183  int al, bl, i, j, k;
    173184
    174185  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);
    179190  for (i=di-1;i>=0;i--)
    180191  {
     
    212223}
    213224
    214 static void smMinSelect(Exponent_t *c, int t, int d)
    215 {
    216   Exponent_t m;
     225static void smMinSelect(long *c, int t, int d)
     226{
     227  long m;
    217228  int pos, i;
    218229  do
     
    234245
    235246/* ----------------- ops with rings ------------------ */
    236 void smRingChange(ring *origR, sip_sring &tmpR, Exponent_t bound)
     247void smRingChange(ring *origR, sip_sring &tmpR, long bound)
    237248{
    238249  *origR =currRing;
     
    339350    return NULL;
    340351  }
    341   Exponent_t bound=smExpBound(I,r,r,r);
     352  long bound=smExpBound(I,r,r,r);
    342353  number diag,h=nInit(1);
    343354  poly res;
     
    379390  int r=idRankFreeModule(I),t=r;
    380391  int c=IDELEMS(I),s=c;
    381   Exponent_t bound;
     392  long bound;
    382393  ring origR;
    383394  sip_sring tmpR;
     
    418429  int r=idRankFreeModule(I),t=r;
    419430  int c=IDELEMS(I),s=c;
    420   Exponent_t bound;
     431  long bound;
    421432  ring origR;
    422433  sip_sring tmpR;
     
    23512362  poly pp;
    23522363  smpoly res, a;
    2353   Exponent_t x;
     2364  long x;
    23542365
    23552366  if (q == NULL)
     
    23882399  smpoly b;
    23892400  poly res, pp, q;
    2390   Exponent_t x;
     2401  long x;
    23912402
    23922403  if (a == NULL)
  • kernel/structs.h

    r89ca47 red5c8d  
    7373
    7474
    75 typedef long Exponent_t;
    76 
    7775enum tHomog
    7876{
     
    201199typedef struct p_Procs_s p_Procs_s;
    202200
    203 // for sparsemat.cc
    204 typedef struct smprec sm_prec;
    205 typedef sm_prec * smpoly;
    206 struct smprec
    207 {
    208   smpoly n;            // the next element
    209   int pos;             // position
    210   int e;               // level
    211   poly m;              // the element
    212   float f;             // complexity of the element
    213 };
    214 
    215201struct n_Procs_s
    216202{
Note: See TracChangeset for help on using the changeset viewer.