Changeset 4e63600 in git for kernel/ideals.cc


Ignore:
Timestamp:
May 18, 2009, 2:36:23 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
Children:
a7f20731ae0418bf29c11a9649481bd93b9bb6fa
Parents:
8660795525dd05cd4a19c0ba04f85758df5542fa
Message:
*hannes: long/int)


git-svn-id: file:///usr/local/Singular/svn/trunk@11813 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    r866079 r4e63600  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ideals.cc,v 1.72 2009-05-18 12:03:28 Singular Exp $ */
     4/* $Id: ideals.cc,v 1.73 2009-05-18 12:36:23 Singular Exp $ */
    55/*
    66* ABSTRACT - all basic methods to manipulate ideals
     
    12871287*works always in a ring with ringorder_s
    12881288*/
    1289 static ideal idPrepare (ideal  h1, tHomog h, int syzcomp, intvec **w)
     1289static ideal idPrepare (ideal  h1, tHomog hom, int syzcomp, intvec **w)
    12901290{
    12911291  ideal   h2, h3;
     
    13101310  }
    13111311  h2->rank = syzcomp+i+1;
     1312 
     1313  //if (hom==testHomog)
     1314  //{
     1315  //  if(idHomIdeal(h1,currQuotient))
     1316  //  {
     1317  //    hom=TRUE;
     1318  //  }
     1319  //}
    13121320
    13131321#if MYTEST
     
    13491357
    13501358
    1351   h3 = kStd(h2,currQuotient,h,w,NULL,syzcomp);
     1359  h3 = kStd(h2,currQuotient,hom,w,NULL,syzcomp);
    13521360  idDelete(&h2);
    13531361  return h3;
     
    30353043  }
    30363044
    3037   int i,j,cmax=2,order=0,ord,* diff,* iscom,diffmin=32000;
     3045  long cmax=1,order=0,ord,* diff,diffmin=32000;
     3046  int *iscom;
     3047  int i,j;
    30383048  poly p=NULL;
    30393049  pFDegProc d;
     
    30483058  {
    30493059    p=F[i]=P[i];
    3050     cmax=si_max(cmax,(int)pMaxComp(p)+1);
    3051   }
    3052   diff = (int *)omAlloc0(cmax*sizeof(int));
     3060    cmax=si_max(cmax,(long)pMaxComp(p));
     3061  }
     3062  cmax++;
     3063  diff = (long *)omAlloc0(cmax*sizeof(long));
    30533064  if (w!=NULL) *w=new intvec(cmax-1);
    30543065  iscom = (int *)omAlloc0(cmax*sizeof(int));
     
    30593070    {
    30603071      p=F[i];
    3061       while ((p!=NULL) && (!iscom[pGetComp(p)])) pIter(p);
     3072      while ((p!=NULL) && (iscom[pGetComp(p)]==0)) pIter(p);
    30623073    }
    30633074    if ((p==NULL) && (i<length))
     
    30673078    else
    30683079    {
    3069       if (p==NULL)
     3080      if (p==NULL) /* && (i==length) */
    30703081      {
    30713082        i=0;
     
    30883099    while (p!=NULL)
    30893100    {
    3090       //if (pLexOrder)
    3091       //  ord=pTotaldegree(p);
    3092       //else
     3101      if (pLexOrder && (currRing->order[0]==ringorder_lp))
     3102        ord=pTotaldegree(p);
     3103      else
    30933104      //  ord = p->order;
    3094       ord = pFDeg(p,currRing);
    3095       if (!iscom[pGetComp(p)])
     3105        ord = pFDeg(p,currRing);
     3106      if (iscom[pGetComp(p)]==0)
    30963107      {
    30973108        diff[pGetComp(p)] = order-ord;
     
    31153126*Print("order %d, ord %d, diff %d\n",order,ord,diff[pGetComp(p)]);
    31163127*/
    3117         if (order != ord+diff[pGetComp(p)])
     3128        if (order != (ord+diff[pGetComp(p)]))
    31183129        {
    31193130          omFreeSize((ADDRESS) iscom,cmax*sizeof(int));
    3120           omFreeSize((ADDRESS) diff,cmax*sizeof(int));
     3131          omFreeSize((ADDRESS) diff,cmax*sizeof(long));
    31213132          omFreeSize((ADDRESS) F,length*sizeof(poly));
    31223133          delete *w;*w=NULL;
     
    31293140  omFreeSize((ADDRESS) iscom,cmax*sizeof(int));
    31303141  omFreeSize((ADDRESS) F,length*sizeof(poly));
    3131   for (i=1;i<cmax;i++) (**w)[i-1]=diff[i];
     3142  for (i=1;i<cmax;i++) (**w)[i-1]=(int)(diff[i]);
    31323143  for (i=1;i<cmax;i++)
    31333144  {
     
    31383149    for (i=1;i<cmax;i++)
    31393150    {
    3140       (**w)[i-1]=diff[i]-diffmin;
    3141     }
    3142   }
    3143   omFreeSize((ADDRESS) diff,cmax*sizeof(int));
     3151      (**w)[i-1]=(int)(diff[i]-diffmin);
     3152    }
     3153  }
     3154  omFreeSize((ADDRESS) diff,cmax*sizeof(long));
    31443155  return TRUE;
    31453156}
Note: See TracChangeset for help on using the changeset viewer.