Changeset b130fb in git
- Timestamp:
- Feb 17, 2005, 10:42:23 AM (18 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 08db0a0dca2c73d19b0d83ba8110def246830498
- Parents:
- ecce503e3c38e63f043db34fbea817c3fc1fdc6c
- Location:
- kernel
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gr_kstd2.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: gr_kstd2.cc,v 1. 4 2004-11-09 14:54:59Singular Exp $ */4 /* $Id: gr_kstd2.cc,v 1.5 2005-02-17 09:42:18 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: noncomm. alg. of Buchberger … … 50 50 int j = 0; 51 51 52 d = pFDeg((*h).p )+(*h).ecart;52 d = pFDeg((*h).p,currRing)+(*h).ecart; 53 53 reddeg = strat->LazyDegree+d; 54 54 loop … … 93 93 } 94 94 /*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); 97 97 (*h).ecart = d-(*h).FDeg; /*pFDeg((*h).p);*/ 98 98 if ((strat->syzComp!=0) && !strat->honey) … … 298 298 int j = 0; 299 299 int pass = 0; 300 int reddeg = pFDeg((*h).p );300 int reddeg = pFDeg((*h).p,currRing); 301 301 302 302 if (TEST_OPT_DEBUG) … … 343 343 /*- try to reduce the s-polynomial -*/ 344 344 pass++; 345 d = pFDeg((*h).p );345 d = pFDeg((*h).p,currRing); 346 346 if ((strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass))) 347 347 { … … 409 409 410 410 pass = j = 0; 411 d = reddeg = pFDeg((*h).p )+(*h).ecart;411 d = reddeg = pFDeg((*h).p,currRing)+(*h).ecart; 412 412 if (TEST_OPT_DEBUG) 413 413 { … … 498 498 /* compute the ecart */ 499 499 if (ei <= (*h).ecart) 500 (*h).ecart = d-pFDeg((*h).p );500 (*h).ecart = d-pFDeg((*h).p,currRing); 501 501 else 502 (*h).ecart = d-pFDeg((*h).p )+ei-(*h).ecart;502 (*h).ecart = d-pFDeg((*h).p,currRing)+ei-(*h).ecart; 503 503 // if (strat->syzComp) 504 504 // { … … 520 520 */ 521 521 pass++; 522 d = pFDeg((*h).p )+(*h).ecart;522 d = pFDeg((*h).p,currRing)+(*h).ecart; 523 523 if ((strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass))) 524 524 { … … 587 587 588 588 if (strat->honey) 589 reddeg = pFDeg((*h).p )+(*h).ecart;589 reddeg = pFDeg((*h).p,currRing)+(*h).ecart; 590 590 else 591 reddeg = pFDeg((*h).p );591 reddeg = pFDeg((*h).p,currRing); 592 592 loop 593 593 { … … 686 686 { 687 687 pass++; 688 d = pFDeg((*h).p );688 d = pFDeg((*h).p,currRing); 689 689 if (strat->honey) 690 690 d += (*h).ecart; … … 808 808 if (strat->Ll== 0) strat->interpt=TRUE; 809 809 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)))) 812 813 { 813 814 /* … … 887 888 if (strat->sl==-1) pos=0; 888 889 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); 890 891 } 891 892 if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat); -
kernel/ideals.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 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 $ */ 5 5 /* 6 6 * ABSTRACT - all basic methods to manipulate ideals … … 2922 2922 else 2923 2923 // order = p->order; 2924 order = pFDeg(p );2924 order = pFDeg(p,currRing); 2925 2925 order += diff[pGetComp(p)]; 2926 2926 p = F[i]; … … 2935 2935 //else 2936 2936 // ord = p->order; 2937 ord = pFDeg(p );2937 ord = pFDeg(p,currRing); 2938 2938 if (!iscom[pGetComp(p)]) 2939 2939 { … … 3015 3015 if (p!=NULL) 3016 3016 { 3017 int d=pFDeg(p );3017 int d=pFDeg(p,currRing); 3018 3018 loop 3019 3019 { 3020 3020 pIter(p); 3021 3021 if (p==NULL) break; 3022 if (d!=pFDeg(p ))3022 if (d!=pFDeg(p,currRing)) 3023 3023 { 3024 3024 // pWrite(q); wrp(p); Print(" -> %d - %d\n",d,pFDeg(p)); … … 3300 3300 while (i>0) 3301 3301 { 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])]; 3303 3303 } 3304 3304 return result; -
kernel/khstd.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: khstd.cc,v 1. 1.1.1 2003-10-06 12:15:54Singular Exp $ */4 /* $Id: khstd.cc,v 1.2 2005-02-17 09:42:19 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT:utils for hilbert driven kStd … … 57 57 newhilb = hHstdSeries(strat->Shdl,w,strat->kHomW,Q,strat->tailRing); 58 58 ln = newhilb->length()-1; 59 deg = degp(strat->P.p )-mw;59 deg = degp(strat->P.p,currRing)-mw; 60 60 loop // compare the series in degree deg, try to increase deg ----------- 61 61 { … … 92 92 } /* loop */ 93 93 delete newhilb; 94 while ((strat->Ll>=0) && (degp(strat->L[strat->Ll].p )-mw < deg)) // the essential step94 while ((strat->Ll>=0) && (degp(strat->L[strat->Ll].p,currRing)-mw < deg)) // the essential step 95 95 { 96 96 count++; -
kernel/kstd1.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 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 $ */ 5 5 /* 6 6 * ABSTRACT: … … 447 447 int z = 10; 448 448 int o = H.SetpFDeg(); 449 H.ecart = pLDeg(H.p,&H.length )-o;449 H.ecart = pLDeg(H.p,&H.length,currRing)-o; 450 450 if ((flag & 2) == 0) cancelunit(&H); 451 451 H.sev = pGetShortExpVector(H.p); … … 526 526 o = H.SetpFDeg(); 527 527 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; 529 529 j = 0; 530 530 H.sev = pGetShortExpVector(H.p); … … 1059 1059 if (strat->kHEdgeFound) 1060 1060 { 1061 strat->HCord = pFDeg(ppNoether )+1;1061 strat->HCord = pFDeg(ppNoether,currRing)+1; 1062 1062 strat->posInT = posInT2; 1063 1063 } … … 1294 1294 { 1295 1295 if (strat->kHEdge!=NULL) 1296 Kstd1_mu=pFDeg(strat->kHEdge );1296 Kstd1_mu=pFDeg(strat->kHEdge,currRing); 1297 1297 else 1298 1298 Kstd1_mu=-1; … … 1753 1753 for (i=IDELEMS(F)-1;i>=0;i--) 1754 1754 { 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; 1757 1757 } 1758 1758 } -
kernel/kstd2.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstd2.cc,v 1. 1.1.1 2003-10-06 12:15:54Singular Exp $ */4 /* $Id: kstd2.cc,v 1.2 2005-02-17 09:42:20 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: alg. of Buchberger … … 506 506 if (strat->Ll== 0) strat->interpt=TRUE; 507 507 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)))) 510 510 { 511 511 /* -
kernel/kstdfac.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstdfac.cc,v 1. 1.1.1 2003-10-06 12:15:56Singular Exp $ */4 /* $Id: kstdfac.cc,v 1.2 2005-02-17 09:42:20 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: factorizing alg. of Buchberger … … 239 239 BOOLEAN k_factorize(poly p,ideal &rfac, ideal &fac_copy) 240 240 { 241 int facdeg=pFDeg(p );241 int facdeg=pFDeg(p,currRing); 242 242 ideal fac=singclap_factorize(p,NULL,1); 243 243 int fac_elems; … … 255 255 fac_copy=idInit(fac_elems,1); 256 256 257 if ((fac_elems!=1)||(facdeg!=pFDeg(fac->m[0] )))257 if ((fac_elems!=1)||(facdeg!=pFDeg(fac->m[0],currRing))) 258 258 { 259 259 if (TEST_OPT_DEBUG) … … 504 504 if (TEST_OPT_DEGBOUND 505 505 && ((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)))) 508 508 { 509 509 /* … … 530 530 { 531 531 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); 533 533 } 534 534 else 535 535 { 536 536 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); 538 538 } 539 539 /* reduction of the element choosen from L */ -
kernel/kutil.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 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 $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for kStd … … 973 973 Lp->FDeg = Lp->pFDeg(); 974 974 (*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)); 976 976 (*Lp).length = 0; 977 977 } … … 3061 3061 } 3062 3062 h.sev = pGetShortExpVector(h.p); 3063 strat->enterS(h,pos,strat );3063 strat->enterS(h,pos,strat,-1); 3064 3064 strat->fromQ[pos]=1; 3065 3065 } … … 3095 3095 pos = posInS(strat,strat->sl,h.p,h.ecart); 3096 3096 h.sev = pGetShortExpVector(h.p); 3097 strat->enterS(h,pos,strat );3097 strat->enterS(h,pos,strat,-1); 3098 3098 } 3099 3099 } … … 3152 3152 } 3153 3153 h.sev = pGetShortExpVector(h.p); 3154 strat->enterS(h,pos,strat );3154 strat->enterS(h,pos,strat,-1); 3155 3155 strat->fromQ[pos]=1; 3156 3156 } … … 3476 3476 if (maxIndex >= 0) 3477 3477 { 3478 e = pLDeg(h,&l )-pFDeg(h);3478 e = pLDeg(h,&l,currRing)-pFDeg(h,currRing); 3479 3479 do 3480 3480 { … … 3495 3495 // pDelete(&h); 3496 3496 if (h == NULL) return NULL; 3497 e = pLDeg(h,&l )-pFDeg(h);3497 e = pLDeg(h,&l,currRing)-pFDeg(h,currRing); 3498 3498 j = 0; 3499 3499 not_sev = ~ pGetShortExpVector(h); … … 4238 4238 /* compare old and new noether*/ 4239 4239 newNoether = pLmInit(strat->kHEdge); 4240 j = pFDeg(newNoether );4240 j = pFDeg(newNoether,currRing); 4241 4241 for (i=1; i<=pVariables; i++) 4242 4242 { -
kernel/kutil.h
recce503 rb130fb 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: kutil.h,v 1. 2 2004-08-03 17:33:56Singular Exp $ */6 /* $Id: kutil.h,v 1.3 2005-02-17 09:42:21 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT: kernel: utils for kStd … … 233 233 int (*posInL)(const LSet set, const int length, 234 234 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*/ ); 236 236 void (*initEcartPair)(LObject * h, poly f, poly g, int ecartF, int ecartG); 237 237 int (*posInLOld)(const LSet Ls,const int Ll, -
kernel/polys1.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys1.cc,v 1. 7 2005-01-27 16:44:13Singular Exp $ */4 /* $Id: polys1.cc,v 1.8 2005-02-17 09:42:22 Singular Exp $ */ 5 5 6 6 /* … … 1026 1026 if ((p == NULL) || (pNext(p) == NULL)) return TRUE; 1027 1027 pFDegProc d=(pLexOrder ? pTotaldegree : pFDeg ); 1028 o = d(p );1028 o = d(p,currRing); 1029 1029 do 1030 1030 { 1031 if (d(qp ) != o) return FALSE;1031 if (d(qp,currRing) != o) return FALSE; 1032 1032 pIter(qp); 1033 1033 } -
kernel/structs.h
recce503 rb130fb 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: structs.h,v 1. 3 2003-12-16 18:30:31 levandovExp $ */6 /* $Id: structs.h,v 1.4 2005-02-17 09:42:22 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 285 285 /* the function pointer types */ 286 286 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);287 typedef long (*pLDegProc)(poly p, int *length, ring r); 288 typedef long (*pFDegProc)(poly p, ring r); 289 typedef void (*p_SetmProc)(poly p, ring r); 290 290 291 291 typedef enum -
kernel/syz.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: syz.cc,v 1. 6 2004-10-26 15:40:28 levandovExp $ */4 /* $Id: syz.cc,v 1.7 2005-02-17 09:42:22 Singular Exp $ */ 5 5 6 6 /* … … 62 62 if (arg->m[i-maxxx]!=NULL) 63 63 { 64 (*w1)[i] = pFDeg(arg->m[i-maxxx] );64 (*w1)[i] = pFDeg(arg->m[i-maxxx],currRing); 65 65 if (pGetComp(arg->m[i-maxxx])!=0) 66 66 { … … 478 478 if (j<IDELEMS(res[0])) 479 479 { 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])) 481 481 setRegularity = FALSE; 482 482 } … … 562 562 if (res[syzIndex-1]->m[i]!=NULL) // hs 563 563 { 564 (*w)[i + rGetCurrSyzLimit()] = pFDeg(res[syzIndex-1]->m[i] );564 (*w)[i + rGetCurrSyzLimit()] = pFDeg(res[syzIndex-1]->m[i],currRing); 565 565 if (pGetComp(res[syzIndex-1]->m[i])>0) 566 566 (*w)[i + rGetCurrSyzLimit()] … … 572 572 { 573 573 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) 575 575 +(*w)[pGetComp(res[syzIndex]->m[i-k])-1]; 576 576 } … … 697 697 if (homog) 698 698 { 699 if (index==0) k = pFDeg(temp->m[j])+degrees[pGetComp(temp->m[j])];700 else 699 if (index==0) k = pFDeg(temp->m[j],currRing)+degrees[pGetComp(temp->m[j])]; 700 else k = degrees[pGetComp(temp->m[j])]; 701 701 if (k>=index) tocancel[k-index]++; 702 702 if ((k>=0) && (index==0)) subFromRank++; … … 822 822 return NULL; 823 823 } 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])]; 825 825 if (temp2[j+1]-i>rows) rows = temp2[j+1]-i; 826 826 if (temp2[j+1]-i<mr) mr = temp2[j+1]-i; … … 885 885 if (res[i]->m[j]!=NULL) 886 886 { 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])]; 888 888 //(*result)[i+1+(temp2[j+1]-i-1)*cols]++; 889 889 //if (temp2[j+1]>i) IMATELEM((*result),temp2[j+1]-i-mr,i+2)++; … … 1031 1031 if (res[i]->m[j]!=NULL) 1032 1032 { 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; 1034 1034 if (k>rsmax) rsmax = k; 1035 1035 if (k<rsmin) rsmin = k; … … 1070 1070 if (res[i]->m[j]!=NULL) 1071 1071 { 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; 1073 1073 IMATELEM(*result,k-rsmin,i+2)++; 1074 1074 } -
kernel/syz0.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: syz0.cc,v 1. 3 2004-06-03 12:27:07Singular Exp $ */4 /* $Id: syz0.cc,v 1.4 2005-02-17 09:42:22 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: resolutions … … 220 220 { 221 221 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); 224 224 //Print("%d", pGetComp(S[j]));PrintS(" "); 225 225 p = S[j]; … … 330 330 * { 331 331 */ 332 totalToRed = pLDeg(toRed,&kk );333 ecartToRed = totalToRed-pFDeg(toRed );332 totalToRed = pLDeg(toRed,&kk,currRing); 333 ecartToRed = totalToRed-pFDeg(toRed,currRing); 334 334 /* 335 335 * } -
kernel/syz2.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: syz2.cc,v 1. 2 2004-06-02 14:54:54Singular Exp $ */4 /* $Id: syz2.cc,v 1.3 2005-02-17 09:42:23 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: resolutions … … 920 920 for (j=0;j<k;j++) 921 921 { 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))++; 923 923 reor->m[j] = toreor->m[j]; 924 924 toreor->m[j] = NULL; -
kernel/syz3.cc
recce503 rb130fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: syz3.cc,v 1. 2 2004-06-02 15:59:12Singular Exp $ */4 /* $Id: syz3.cc,v 1.3 2005-02-17 09:42:23 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: resolutions … … 273 273 if ((syzstr->regularity>0) && (res[syzIndex]->m[i]!=NULL)) 274 274 { 275 if (pFDeg(res[syzIndex]->m[i] )>=syzstr->regularity+syzIndex)275 if (pFDeg(res[syzIndex]->m[i],currRing)>=syzstr->regularity+syzIndex) 276 276 pDelete(&res[syzIndex]->m[i]); 277 277 } … … 335 335 IDELEMS(old_repr) += 16; 336 336 } 337 k = pFDeg(new_generators->m[i] );337 k = pFDeg(new_generators->m[i],currRing); 338 338 kk = pGetComp(new_generators->m[i]); 339 339 j = og_ini; … … 341 341 (pGetComp(old_generators->m[j])<kk)) j++; 342 342 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++; 344 344 for (jj=og_elem;jj>j;jj--) 345 345 { … … 440 440 tso.lcm = prs[jj]; 441 441 prs[jj] = NULL; 442 tso.order = pFDeg(tso.lcm );442 tso.order = pFDeg(tso.lcm,currRing); 443 443 tso.p1 = old_generators->m[jj]; 444 444 tso.p2 = old_generators->m[j]; … … 679 679 { 680 680 /*--- 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)) 682 682 toReplace = tso.ind1+1; 683 else if (pFDeg(tso.p2 )==pFDeg(tso.lcm))683 else if (pFDeg(tso.p2,currRing)==pFDeg(tso.lcm,currRing)) 684 684 toReplace = tso.ind2+1; 685 685 } … … 687 687 /*--- tests wether the product criterion applies --------------*/ 688 688 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)) 690 690 { 691 691 tso.p = NULL; … … 1139 1139 tso.lcm = prs[j]; 1140 1140 prs[j] = NULL; 1141 tso.order = pFDeg(tso.lcm );1141 tso.order = pFDeg(tso.lcm,currRing); 1142 1142 tso.p1 = add_generators->m[j]; 1143 1143 tso.p2 = add_generators->m[i]; … … 1198 1198 PrintS("."); 1199 1199 #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)) 1201 1201 { 1202 1202 if (TEST_OPT_PROT) PrintS("pc"); … … 1423 1423 while ((next_place_add>0) && (add_generators->m[next_place_add-1]==NULL)) 1424 1424 next_place_add--; 1425 int next_deg = pFDeg(temp_generators->m[i] );1425 int next_deg = pFDeg(temp_generators->m[i],currRing); 1426 1426 next_new_el = next_place_add; 1427 1427 /*--- loop about all all elements-----------------------------------*/ … … 1443 1443 } 1444 1444 #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)) 1446 1446 { 1447 1447 next_p = temp_generators->m[i]; … … 1504 1504 red_deg = next_deg; 1505 1505 if (i<idel_temp) 1506 next_deg = pFDeg(temp_generators->m[i] );1506 next_deg = pFDeg(temp_generators->m[i],currRing); 1507 1507 else 1508 1508 next_deg = -1; … … 1608 1608 p = new_generators->m[j]; 1609 1609 new_generators->m[j] = NULL; 1610 deg_p = pFDeg(p );1610 deg_p = pFDeg(p,currRing); 1611 1611 if (min_deg<0) 1612 1612 { … … 1619 1619 k = 0; 1620 1620 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++; 1622 1622 for (jj=idel_temp-1;jj>k;jj--) 1623 1623 { … … 1787 1787 if (temp->m[0]!=NULL) 1788 1788 { 1789 int maxdeg=pFDeg(temp->m[IDELEMS(temp)-1]),md; 1789 int md; 1790 int maxdeg=pFDeg(temp->m[IDELEMS(temp)-1],currRing); 1790 1791 ideal temp1=idInit(IDELEMS(temp),temp->rank); 1791 1792 for (j=IDELEMS(temp)-2;j>=0;j--) 1792 1793 { 1793 jj = pFDeg(temp->m[j] );1794 jj = pFDeg(temp->m[j],currRing); 1794 1795 if (jj>maxdeg) maxdeg = jj; 1795 1796 } … … 1801 1802 if (temp->m[j]!=NULL) 1802 1803 { 1803 jj = pFDeg(temp->m[j] );1804 jj = pFDeg(temp->m[j],currRing); 1804 1805 if (jj<md) md = jj; 1805 1806 } … … 1807 1808 for (j=0;j<IDELEMS(temp);j++) 1808 1809 { 1809 if ((temp->m[j]!=NULL) && (pFDeg(temp->m[j] )==md))1810 if ((temp->m[j]!=NULL) && (pFDeg(temp->m[j],currRing)==md)) 1810 1811 { 1811 1812 temp1->m[k] = temp->m[j]; … … 1845 1846 if (!nIsOne(pGetCoeff(new_generators->m[0]))) 1846 1847 pNorm(new_generators->m[0]); 1847 next_deg = pFDeg(new_generators->m[0] );1848 next_deg = pFDeg(new_generators->m[0],currRing); 1848 1849 next_gen = pCopy(new_generators->m[0]); 1849 1850 } … … 1990 1991 { 1991 1992 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)); 1993 1995 } 1994 1996 }
Note: See TracChangeset
for help on using the changeset viewer.