Changeset b130fb in git


Ignore:
Timestamp:
Feb 17, 2005, 10:42:23 AM (19 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
08db0a0dca2c73d19b0d83ba8110def246830498
Parents:
ecce503e3c38e63f043db34fbea817c3fc1fdc6c
Message:
*hannes: gcc-3.4


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

Legend:

Unmodified
Added
Removed
  • kernel/gr_kstd2.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: gr_kstd2.cc,v 1.4 2004-11-09 14:54:59 Singular Exp $ */
     4/* $Id: gr_kstd2.cc,v 1.5 2005-02-17 09:42:18 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: noncomm. alg. of Buchberger
     
    5050  int j = 0;
    5151
    52   d = pFDeg((*h).p)+(*h).ecart;
     52  d = pFDeg((*h).p,currRing)+(*h).ecart;
    5353  reddeg = strat->LazyDegree+d;
    5454  loop
     
    9393      }
    9494      /*computes the ecart*/
    95       d = pLDeg((*h).p,&((*h).length));
    96       (*h).FDeg=pFDeg((*h).p);
     95      d = pLDeg((*h).p,&((*h).length),currRing);
     96      (*h).FDeg=pFDeg((*h).p,currRing);
    9797      (*h).ecart = d-(*h).FDeg; /*pFDeg((*h).p);*/
    9898      if ((strat->syzComp!=0) && !strat->honey)
     
    298298  int j = 0;
    299299  int pass = 0;
    300   int reddeg = pFDeg((*h).p);
     300  int reddeg = pFDeg((*h).p,currRing);
    301301
    302302  if (TEST_OPT_DEBUG)
     
    343343      /*- try to reduce the s-polynomial -*/
    344344      pass++;
    345       d = pFDeg((*h).p);
     345      d = pFDeg((*h).p,currRing);
    346346      if ((strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass)))
    347347      {
     
    409409
    410410  pass = j = 0;
    411   d = reddeg = pFDeg((*h).p)+(*h).ecart;
     411  d = reddeg = pFDeg((*h).p,currRing)+(*h).ecart;
    412412  if (TEST_OPT_DEBUG)
    413413  {
     
    498498      /* compute the ecart */
    499499      if (ei <= (*h).ecart)
    500         (*h).ecart = d-pFDeg((*h).p);
     500        (*h).ecart = d-pFDeg((*h).p,currRing);
    501501      else
    502         (*h).ecart = d-pFDeg((*h).p)+ei-(*h).ecart;
     502        (*h).ecart = d-pFDeg((*h).p,currRing)+ei-(*h).ecart;
    503503//      if (strat->syzComp)
    504504//      {
     
    520520      */
    521521      pass++;
    522       d = pFDeg((*h).p)+(*h).ecart;
     522      d = pFDeg((*h).p,currRing)+(*h).ecart;
    523523      if ((strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass)))
    524524      {
     
    587587
    588588  if (strat->honey)
    589     reddeg = pFDeg((*h).p)+(*h).ecart;
     589    reddeg = pFDeg((*h).p,currRing)+(*h).ecart;
    590590  else
    591     reddeg = pFDeg((*h).p);
     591    reddeg = pFDeg((*h).p,currRing);
    592592  loop
    593593  {
     
    686686      {
    687687        pass++;
    688         d = pFDeg((*h).p);
     688        d = pFDeg((*h).p,currRing);
    689689        if (strat->honey)
    690690          d += (*h).ecart;
     
    808808    if (strat->Ll== 0) strat->interpt=TRUE;
    809809    if (TEST_OPT_DEGBOUND
    810     && ((strat->honey && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p)>Kstd1_deg))
    811        || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p)>Kstd1_deg))))
     810    && ((strat->honey
     811    && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
     812       || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))
    812813    {
    813814      /*
     
    887888              if (strat->sl==-1) pos=0;
    888889              else pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
    889               strat->enterS(strat->P,pos,strat);
     890              strat->enterS(strat->P,pos,strat,-1);
    890891            }
    891892            if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
  • kernel/ideals.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ideals.cc,v 1.5 2004-07-16 08:42:59 Singular Exp $ */
     4/* $Id: ideals.cc,v 1.6 2005-02-17 09:42:19 Singular Exp $ */
    55/*
    66* ABSTRACT - all basic methods to manipulate ideals
     
    29222922      else
    29232923      //  order = p->order;
    2924         order = pFDeg(p);
     2924        order = pFDeg(p,currRing);
    29252925      order += diff[pGetComp(p)];
    29262926      p = F[i];
     
    29352935      //else
    29362936      //  ord = p->order;
    2937       ord = pFDeg(p);
     2937      ord = pFDeg(p,currRing);
    29382938      if (!iscom[pGetComp(p)])
    29392939      {
     
    30153015    if (p!=NULL)
    30163016    {
    3017       int d=pFDeg(p);
     3017      int d=pFDeg(p,currRing);
    30183018      loop
    30193019      {
    30203020        pIter(p);
    30213021        if (p==NULL) break;
    3022         if (d!=pFDeg(p))
     3022        if (d!=pFDeg(p,currRing))
    30233023        {
    30243024          // pWrite(q); wrp(p); Print(" -> %d - %d\n",d,pFDeg(p));
     
    33003300  while (i>0)
    33013301  {
    3302     (*result)[i]=pFDeg(mod->m[i])+(*weights)[pGetComp(mod->m[i])];
     3302    (*result)[i]=pFDeg(mod->m[i],currRing)+(*weights)[pGetComp(mod->m[i])];
    33033303  }
    33043304  return result;
  • kernel/khstd.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: khstd.cc,v 1.1.1.1 2003-10-06 12:15:54 Singular Exp $ */
     4/* $Id: khstd.cc,v 1.2 2005-02-17 09:42:19 Singular Exp $ */
    55/*
    66* ABSTRACT:utils for hilbert driven kStd
     
    5757    newhilb = hHstdSeries(strat->Shdl,w,strat->kHomW,Q,strat->tailRing);
    5858    ln = newhilb->length()-1;
    59     deg = degp(strat->P.p)-mw;
     59    deg = degp(strat->P.p,currRing)-mw;
    6060    loop // compare the series in degree deg, try to increase deg -----------
    6161    {
     
    9292    } /* loop */
    9393    delete newhilb;
    94     while ((strat->Ll>=0) && (degp(strat->L[strat->Ll].p)-mw < deg)) // the essential step
     94    while ((strat->Ll>=0) && (degp(strat->L[strat->Ll].p,currRing)-mw < deg)) // the essential step
    9595    {
    9696      count++;
  • kernel/kstd1.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd1.cc,v 1.4 2004-09-28 13:23:49 Singular Exp $ */
     4/* $Id: kstd1.cc,v 1.5 2005-02-17 09:42:19 Singular Exp $ */
    55/*
    66* ABSTRACT:
     
    447447  int z = 10;
    448448  int o = H.SetpFDeg();
    449   H.ecart = pLDeg(H.p,&H.length)-o;
     449  H.ecart = pLDeg(H.p,&H.length,currRing)-o;
    450450  if ((flag & 2) == 0) cancelunit(&H);
    451451  H.sev = pGetShortExpVector(H.p);
     
    526526      o = H.SetpFDeg();
    527527      if ((flag &2 ) == 0) cancelunit(&H);
    528       H.ecart = pLDeg(H.p,&(H.length))-o;
     528      H.ecart = pLDeg(H.p,&(H.length),currRing)-o;
    529529      j = 0;
    530530      H.sev = pGetShortExpVector(H.p);
     
    10591059  if (strat->kHEdgeFound)
    10601060  {
    1061     strat->HCord = pFDeg(ppNoether)+1;
     1061    strat->HCord = pFDeg(ppNoether,currRing)+1;
    10621062    strat->posInT = posInT2;
    10631063  }
     
    12941294  {
    12951295    if (strat->kHEdge!=NULL)
    1296       Kstd1_mu=pFDeg(strat->kHEdge);
     1296      Kstd1_mu=pFDeg(strat->kHEdge,currRing);
    12971297    else
    12981298      Kstd1_mu=-1;
     
    17531753        for (i=IDELEMS(F)-1;i>=0;i--)
    17541754        {
    1755           if ((F->m[i]!=NULL) && (pFDeg(F->m[i])>=Kstd1_deg))
    1756             Kstd1_deg = pFDeg(F->m[i])+1;
     1755          if ((F->m[i]!=NULL) && (pFDeg(F->m[i],currRing)>=Kstd1_deg))
     1756            Kstd1_deg = pFDeg(F->m[i],currRing)+1;
    17571757        }
    17581758      }
  • kernel/kstd2.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.1.1.1 2003-10-06 12:15:54 Singular Exp $ */
     4/* $Id: kstd2.cc,v 1.2 2005-02-17 09:42:20 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    506506    if (strat->Ll== 0) strat->interpt=TRUE;
    507507    if (TEST_OPT_DEGBOUND
    508         && ((strat->honey && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p)>Kstd1_deg))
    509             || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p)>Kstd1_deg))))
     508        && ((strat->honey && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
     509            || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))
    510510    {
    511511      /*
  • kernel/kstdfac.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstdfac.cc,v 1.1.1.1 2003-10-06 12:15:56 Singular Exp $ */
     4/* $Id: kstdfac.cc,v 1.2 2005-02-17 09:42:20 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: factorizing alg. of Buchberger
     
    239239BOOLEAN k_factorize(poly p,ideal &rfac, ideal &fac_copy)
    240240{
    241   int facdeg=pFDeg(p);
     241  int facdeg=pFDeg(p,currRing);
    242242  ideal fac=singclap_factorize(p,NULL,1);
    243243  int fac_elems;
     
    255255  fac_copy=idInit(fac_elems,1);
    256256
    257   if ((fac_elems!=1)||(facdeg!=pFDeg(fac->m[0])))
     257  if ((fac_elems!=1)||(facdeg!=pFDeg(fac->m[0],currRing)))
    258258  {
    259259    if (TEST_OPT_DEBUG)
     
    504504    if (TEST_OPT_DEGBOUND
    505505    && ((strat->honey
    506         && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p)>Kstd1_deg))
    507       || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p)>Kstd1_deg))))
     506        && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
     507      || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))
    508508    {
    509509      /*
     
    530530    {
    531531      if (TEST_OPT_PROT)
    532         message(strat->P.ecart+pFDeg(strat->P.p),&olddeg,&reduc,strat, red_result);
     532        message(strat->P.ecart+pFDeg(strat->P.p,currRing),&olddeg,&reduc,strat, red_result);
    533533    }
    534534    else
    535535    {
    536536      if (TEST_OPT_PROT)
    537         message(pFDeg(strat->P.p),&olddeg,&reduc,strat, red_result);
     537        message(pFDeg(strat->P.p,currRing),&olddeg,&reduc,strat, red_result);
    538538    }
    539539    /* reduction of the element choosen from L */
  • kernel/kutil.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.5 2004-11-09 14:55:00 Singular Exp $ */
     4/* $Id: kutil.cc,v 1.6 2005-02-17 09:42:20 Singular Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    973973  Lp->FDeg = Lp->pFDeg();
    974974  (*Lp).ecart = si_max(ecartF,ecartG);
    975   (*Lp).ecart = (*Lp).ecart- (Lp->FDeg -pFDeg((*Lp).lcm));
     975  (*Lp).ecart = (*Lp).ecart- (Lp->FDeg -pFDeg((*Lp).lcm,currRing));
    976976  (*Lp).length = 0;
    977977}
     
    30613061          }
    30623062          h.sev = pGetShortExpVector(h.p);
    3063           strat->enterS(h,pos,strat);
     3063          strat->enterS(h,pos,strat,-1);
    30643064          strat->fromQ[pos]=1;
    30653065        }
     
    30953095          pos = posInS(strat,strat->sl,h.p,h.ecart);
    30963096        h.sev = pGetShortExpVector(h.p);
    3097         strat->enterS(h,pos,strat);
     3097        strat->enterS(h,pos,strat,-1);
    30983098      }
    30993099    }
     
    31523152          }
    31533153          h.sev = pGetShortExpVector(h.p);
    3154           strat->enterS(h,pos,strat);
     3154          strat->enterS(h,pos,strat,-1);
    31553155          strat->fromQ[pos]=1;
    31563156        }
     
    34763476  if (maxIndex >= 0)
    34773477  {
    3478     e = pLDeg(h,&l)-pFDeg(h);
     3478    e = pLDeg(h,&l,currRing)-pFDeg(h,currRing);
    34793479    do
    34803480    {
     
    34953495        // pDelete(&h);
    34963496        if (h == NULL) return NULL;
    3497         e = pLDeg(h,&l)-pFDeg(h);
     3497        e = pLDeg(h,&l,currRing)-pFDeg(h,currRing);
    34983498        j = 0;
    34993499        not_sev = ~ pGetShortExpVector(h);
     
    42384238  /* compare old and new noether*/
    42394239  newNoether = pLmInit(strat->kHEdge);
    4240   j = pFDeg(newNoether);
     4240  j = pFDeg(newNoether,currRing);
    42414241  for (i=1; i<=pVariables; i++)
    42424242  {
  • kernel/kutil.h

    recce503 rb130fb  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: kutil.h,v 1.2 2004-08-03 17:33:56 Singular Exp $ */
     6/* $Id: kutil.h,v 1.3 2005-02-17 09:42:21 Singular Exp $ */
    77/*
    88* ABSTRACT: kernel: utils for kStd
     
    233233  int (*posInL)(const LSet set, const int length,
    234234                LObject* L,const kStrategy strat);
    235   void (*enterS)(LObject h, int pos,kStrategy strat, int atR = -1);
     235  void (*enterS)(LObject h, int pos,kStrategy strat, int atR/* =-1*/ );
    236236  void (*initEcartPair)(LObject * h, poly f, poly g, int ecartF, int ecartG);
    237237  int (*posInLOld)(const LSet Ls,const int Ll,
  • kernel/polys1.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: polys1.cc,v 1.7 2005-01-27 16:44:13 Singular Exp $ */
     4/* $Id: polys1.cc,v 1.8 2005-02-17 09:42:22 Singular Exp $ */
    55
    66/*
     
    10261026  if ((p == NULL) || (pNext(p) == NULL)) return TRUE;
    10271027  pFDegProc d=(pLexOrder ? pTotaldegree : pFDeg );
    1028   o = d(p);
     1028  o = d(p,currRing);
    10291029  do
    10301030  {
    1031     if (d(qp) != o) return FALSE;
     1031    if (d(qp,currRing) != o) return FALSE;
    10321032    pIter(qp);
    10331033  }
  • kernel/structs.h

    recce503 rb130fb  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: structs.h,v 1.3 2003-12-16 18:30:31 levandov Exp $ */
     6/* $Id: structs.h,v 1.4 2005-02-17 09:42:22 Singular Exp $ */
    77/*
    88* ABSTRACT
     
    285285/* the function pointer types */
    286286
    287 typedef long     (*pLDegProc)(poly p, int *length, ring r= currRing);
    288 typedef long     (*pFDegProc)(poly p, ring r = currRing);
    289 typedef void     (*p_SetmProc)(poly p, ring r = currRing);
     287typedef long     (*pLDegProc)(poly p, int *length, ring r);
     288typedef long     (*pFDegProc)(poly p, ring r);
     289typedef void     (*p_SetmProc)(poly p, ring r);
    290290
    291291typedef enum
  • kernel/syz.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: syz.cc,v 1.6 2004-10-26 15:40:28 levandov Exp $ */
     4/* $Id: syz.cc,v 1.7 2005-02-17 09:42:22 Singular Exp $ */
    55
    66/*
     
    6262    if (arg->m[i-maxxx]!=NULL)
    6363    {
    64       (*w1)[i] = pFDeg(arg->m[i-maxxx]);
     64      (*w1)[i] = pFDeg(arg->m[i-maxxx],currRing);
    6565      if (pGetComp(arg->m[i-maxxx])!=0)
    6666      {
     
    478478    if (j<IDELEMS(res[0]))
    479479    {
    480       if (pFDeg(res[0]->m[j])!=pTotaldegree(res[0]->m[j]))
     480      if (pFDeg(res[0]->m[j],currRing)!=pTotaldegree(res[0]->m[j]))
    481481        setRegularity = FALSE;
    482482    }
     
    562562        if (res[syzIndex-1]->m[i]!=NULL) // hs
    563563        {
    564           (*w)[i + rGetCurrSyzLimit()] = pFDeg(res[syzIndex-1]->m[i]);
     564          (*w)[i + rGetCurrSyzLimit()] = pFDeg(res[syzIndex-1]->m[i],currRing);
    565565          if (pGetComp(res[syzIndex-1]->m[i])>0)
    566566            (*w)[i + rGetCurrSyzLimit()]
     
    572572      {
    573573        if (res[syzIndex]->m[i-k]!=NULL)
    574           (*w)[i+rGetCurrSyzLimit()] = pFDeg(res[syzIndex]->m[i-k])
     574          (*w)[i+rGetCurrSyzLimit()] = pFDeg(res[syzIndex]->m[i-k],currRing)
    575575                    +(*w)[pGetComp(res[syzIndex]->m[i-k])-1];
    576576      }
     
    697697    if (homog)
    698698    {
    699       if (index==0)      k = pFDeg(temp->m[j])+degrees[pGetComp(temp->m[j])];
    700       else               k = degrees[pGetComp(temp->m[j])];
     699      if (index==0) k = pFDeg(temp->m[j],currRing)+degrees[pGetComp(temp->m[j])];
     700      else          k = degrees[pGetComp(temp->m[j])];
    701701      if (k>=index) tocancel[k-index]++;
    702702      if ((k>=0) && (index==0)) subFromRank++;
     
    822822          return NULL;
    823823        }
    824         temp2[j+1] = pFDeg(res[i]->m[j])+temp1[pGetComp(res[i]->m[j])];
     824        temp2[j+1] = pFDeg(res[i]->m[j],currRing)+temp1[pGetComp(res[i]->m[j])];
    825825        if (temp2[j+1]-i>rows) rows = temp2[j+1]-i;
    826826        if (temp2[j+1]-i<mr) mr = temp2[j+1]-i;
     
    885885      if (res[i]->m[j]!=NULL)
    886886      {
    887         temp2[j+1] = pFDeg(res[i]->m[j])+temp1[pGetComp(res[i]->m[j])];
     887        temp2[j+1] = pFDeg(res[i]->m[j],currRing)+temp1[pGetComp(res[i]->m[j])];
    888888        //(*result)[i+1+(temp2[j+1]-i-1)*cols]++;
    889889        //if (temp2[j+1]>i) IMATELEM((*result),temp2[j+1]-i-mr,i+2)++;
     
    10311031      if (res[i]->m[j]!=NULL)
    10321032      {
    1033         k = pFDeg(res[i]->m[j])+(*(weights[i]))[pGetComp(res[i]->m[j])]-i-1;
     1033        k = pFDeg(res[i]->m[j],currRing)+(*(weights[i]))[pGetComp(res[i]->m[j])]-i-1;
    10341034        if (k>rsmax) rsmax = k;
    10351035        if (k<rsmin) rsmin = k;
     
    10701070      if (res[i]->m[j]!=NULL)
    10711071      {
    1072         k = pFDeg(res[i]->m[j])+(*(weights[i]))[pGetComp(res[i]->m[j])]-i;
     1072        k = pFDeg(res[i]->m[j],currRing)+(*(weights[i]))[pGetComp(res[i]->m[j])]-i;
    10731073        IMATELEM(*result,k-rsmin,i+2)++;
    10741074      }
  • kernel/syz0.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: syz0.cc,v 1.3 2004-06-03 12:27:07 Singular Exp $ */
     4/* $Id: syz0.cc,v 1.4 2005-02-17 09:42:22 Singular Exp $ */
    55/*
    66* ABSTRACT: resolutions
     
    220220  {
    221221    S[j] = pCopy(F[j]);
    222     totalS[j] = pLDeg(S[j],&k);
    223     ecartS[j] = totalS[j]-pFDeg(S[j]);
     222    totalS[j] = pLDeg(S[j],&k,currRing);
     223    ecartS[j] = totalS[j]-pFDeg(S[j],currRing);
    224224//Print("%d", pGetComp(S[j]));PrintS("  ");
    225225    p = S[j];
     
    330330*         {
    331331*/
    332             totalToRed = pLDeg(toRed,&kk);
    333             ecartToRed = totalToRed-pFDeg(toRed);
     332            totalToRed = pLDeg(toRed,&kk,currRing);
     333            ecartToRed = totalToRed-pFDeg(toRed,currRing);
    334334/*
    335335*         }
  • kernel/syz2.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: syz2.cc,v 1.2 2004-06-02 14:54:54 Singular Exp $ */
     4/* $Id: syz2.cc,v 1.3 2005-02-17 09:42:23 Singular Exp $ */
    55/*
    66* ABSTRACT: resolutions
     
    920920      for (j=0;j<k;j++)
    921921      {
    922         if (toreor->m[j]!=NULL) (IMATELEM(*syzstr->betti,pFDeg(toreor->m[j])-i+1,i+1))++;
     922        if (toreor->m[j]!=NULL) (IMATELEM(*syzstr->betti,pFDeg(toreor->m[j],currRing)-i+1,i+1))++;
    923923        reor->m[j] = toreor->m[j];
    924924        toreor->m[j] = NULL;
  • kernel/syz3.cc

    recce503 rb130fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: syz3.cc,v 1.2 2004-06-02 15:59:12 Singular Exp $ */
     4/* $Id: syz3.cc,v 1.3 2005-02-17 09:42:23 Singular Exp $ */
    55/*
    66* ABSTRACT: resolutions
     
    273273      if ((syzstr->regularity>0) && (res[syzIndex]->m[i]!=NULL))
    274274      {
    275         if (pFDeg(res[syzIndex]->m[i])>=syzstr->regularity+syzIndex)
     275        if (pFDeg(res[syzIndex]->m[i],currRing)>=syzstr->regularity+syzIndex)
    276276          pDelete(&res[syzIndex]->m[i]);
    277277      }
     
    335335      IDELEMS(old_repr) += 16;
    336336    }
    337     k = pFDeg(new_generators->m[i]);
     337    k = pFDeg(new_generators->m[i],currRing);
    338338    kk = pGetComp(new_generators->m[i]);
    339339    j = og_ini;
     
    341341           (pGetComp(old_generators->m[j])<kk)) j++;
    342342    while ((j<og_elem) && (old_generators->m[j]!=NULL) &&
    343            (pFDeg(old_generators->m[j])<=k)) j++;
     343           (pFDeg(old_generators->m[j],currRing)<=k)) j++;
    344344    for (jj=og_elem;jj>j;jj--)
    345345    {
     
    440440        tso.lcm = prs[jj];
    441441        prs[jj] = NULL;
    442         tso.order = pFDeg(tso.lcm);
     442        tso.order = pFDeg(tso.lcm,currRing);
    443443        tso.p1 = old_generators->m[jj];
    444444        tso.p2 = old_generators->m[j];
     
    679679    {
    680680/*--- tests wether a generator must be replaced (lt(f1)|lt(f2)!)--*/
    681       if (pFDeg(tso.p1)==pFDeg(tso.lcm))
     681      if (pFDeg(tso.p1,currRing)==pFDeg(tso.lcm,currRing))
    682682        toReplace = tso.ind1+1;
    683       else if (pFDeg(tso.p2)==pFDeg(tso.lcm))
     683      else if (pFDeg(tso.p2,currRing)==pFDeg(tso.lcm,currRing))
    684684        toReplace = tso.ind2+1;
    685685    }
     
    687687/*--- tests wether the product criterion applies --------------*/
    688688    if ((index==0) && (old_generators->rank==1) &&
    689         (pFDeg(tso.p1)+pFDeg(tso.p2)==tso.order))
     689        (pFDeg(tso.p1,currRing)+pFDeg(tso.p2,currRing)==tso.order))
    690690    {
    691691      tso.p = NULL;
     
    11391139        tso.lcm = prs[j];
    11401140        prs[j] = NULL;
    1141         tso.order = pFDeg(tso.lcm);
     1141        tso.order = pFDeg(tso.lcm,currRing);
    11421142        tso.p1 = add_generators->m[j];
    11431143        tso.p2 = add_generators->m[i];
     
    11981198      PrintS(".");
    11991199#ifdef USE_PROD_CRIT
    1200     if (pFDeg(tso.p1)+pFDeg(tso.p2)==tso.order+pFDeg(deg_soc))
     1200    if (pFDeg(tso.p1,currRing)+pFDeg(tso.p2,currRing)==tso.order+pFDeg(deg_soc,currRing))
    12011201    {
    12021202      if (TEST_OPT_PROT) PrintS("pc");
     
    14231423  while ((next_place_add>0) && (add_generators->m[next_place_add-1]==NULL))
    14241424    next_place_add--;
    1425   int next_deg = pFDeg(temp_generators->m[i]);
     1425  int next_deg = pFDeg(temp_generators->m[i],currRing);
    14261426  next_new_el = next_place_add;
    14271427/*--- loop about all all elements-----------------------------------*/
     
    14431443    }
    14441444#endif
    1445     while ((i<idel_temp) && (pFDeg(temp_generators->m[i])==next_deg))
     1445    while ((i<idel_temp) && (pFDeg(temp_generators->m[i],currRing)==next_deg))
    14461446    {
    14471447      next_p = temp_generators->m[i];
     
    15041504    red_deg = next_deg;
    15051505    if (i<idel_temp)
    1506       next_deg = pFDeg(temp_generators->m[i]);
     1506      next_deg = pFDeg(temp_generators->m[i],currRing);
    15071507    else
    15081508      next_deg = -1;
     
    16081608      p = new_generators->m[j];
    16091609      new_generators->m[j] = NULL;
    1610       deg_p = pFDeg(p);
     1610      deg_p = pFDeg(p,currRing);
    16111611      if (min_deg<0)
    16121612      {
     
    16191619      k = 0;
    16201620      while ((k<idel_temp) && (temp_generators->m[k]!=NULL) &&
    1621              (pFDeg(temp_generators->m[k])<=deg_p)) k++;
     1621             (pFDeg(temp_generators->m[k],currRing)<=deg_p)) k++;
    16221622      for (jj=idel_temp-1;jj>k;jj--)
    16231623      {
     
    17871787  if (temp->m[0]!=NULL)
    17881788  {
    1789     int maxdeg=pFDeg(temp->m[IDELEMS(temp)-1]),md;
     1789    int md;
     1790    int maxdeg=pFDeg(temp->m[IDELEMS(temp)-1],currRing);
    17901791    ideal temp1=idInit(IDELEMS(temp),temp->rank);
    17911792    for (j=IDELEMS(temp)-2;j>=0;j--)
    17921793    {
    1793       jj = pFDeg(temp->m[j]);
     1794      jj = pFDeg(temp->m[j],currRing);
    17941795      if (jj>maxdeg) maxdeg = jj;
    17951796    }
     
    18011802        if (temp->m[j]!=NULL)
    18021803        {
    1803           jj = pFDeg(temp->m[j]);
     1804          jj = pFDeg(temp->m[j],currRing);
    18041805          if (jj<md) md = jj;
    18051806        }
     
    18071808      for (j=0;j<IDELEMS(temp);j++)
    18081809      {
    1809         if ((temp->m[j]!=NULL) && (pFDeg(temp->m[j])==md))
     1810        if ((temp->m[j]!=NULL) && (pFDeg(temp->m[j],currRing)==md))
    18101811        {
    18111812          temp1->m[k] = temp->m[j];
     
    18451846      if (!nIsOne(pGetCoeff(new_generators->m[0])))
    18461847        pNorm(new_generators->m[0]);
    1847       next_deg = pFDeg(new_generators->m[0]);
     1848      next_deg = pFDeg(new_generators->m[0],currRing);
    18481849      next_gen = pCopy(new_generators->m[0]);
    18491850    }
     
    19901991          {
    19911992            PrintS("Da ist was faul!!!\n");
    1992             Print("Aber: Regularitaet %d, Grad %d\n",syzstr->regularity,pFDeg(totake[index]->m[i]));
     1993            Print("Aber: Regularitaet %d, Grad %d\n",
     1994                   syzstr->regularity,pFDeg(totake[index]->m[i],currRing));
    19931995          }
    19941996        }
Note: See TracChangeset for help on using the changeset viewer.