Changeset 9b3700 in git
- Timestamp:
- Jul 20, 2011, 4:46:43 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
- Children:
- 48cf05bb3d2a2234c35b5e4f732668df3b3df5c8
- Parents:
- 2cbef915697324ddbff28f775df52a7ee954c3ad
- git-author:
- mlee <martinlee84@web.de>2011-07-20 16:46:43+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:52:44+01:00
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kutil.cc
r2cbef9 r9b3700 12 12 #include <stdlib.h> 13 13 #include <string.h> 14 #include <kernel/mod2.h>14 #include "mod2.h" 15 15 16 16 #ifndef NDEBUG … … 322 322 poly h; 323 323 324 if(rHasGlobalOrdering _currRing()) return;324 if(rHasGlobalOrdering (currRing)) return; 325 325 if(TEST_OPT_CANCELUNIT) return; 326 326 … … 1058 1058 Lp->FDeg = Lp->pFDeg(); 1059 1059 (*Lp).ecart = si_max(ecartF,ecartG); 1060 (*Lp).ecart = (*Lp).ecart- (Lp->FDeg -p FDeg((*Lp).lcm,currRing));1060 (*Lp).ecart = (*Lp).ecart- (Lp->FDeg -p_FDeg((*Lp).lcm,currRing)); 1061 1061 (*Lp).length = 0; 1062 1062 } … … 1086 1086 /*- computes the lcm(s[i],p) -*/ 1087 1087 Lp.lcm = pInit(); 1088 pSetCoeff0(Lp.lcm, n Lcm(pGetCoeff(p), pGetCoeff(strat->S[i]), currRing));1088 pSetCoeff0(Lp.lcm, n_Lcm(pGetCoeff(p), pGetCoeff(strat->S[i]), currRing->cf)); 1089 1089 // Lp.lcm == 0 1090 1090 if (nIsZero(pGetCoeff(Lp.lcm))) … … 1109 1109 pSetm(Lp.lcm); 1110 1110 assume(!strat->sugarCrit); 1111 if (pHasNotCF(p,strat->S[i]) && nIsUnit(pGetCoeff(p)) && nIsUnit(pGetCoeff(strat->S[i]))) 1111 if (pHasNotCF(p,strat->S[i]) && n_IsUnit(pGetCoeff(p),currRing->cf) 1112 && n_IsUnit(pGetCoeff(strat->S[i]),currRing->cf)) 1112 1113 { 1113 1114 #ifdef KDEBUG … … 1136 1137 { 1137 1138 compare=pDivCompRing(strat->B[j].lcm,Lp.lcm); 1138 compareCoeff = n DivComp(pGetCoeff(strat->B[j].lcm), pGetCoeff(Lp.lcm));1139 compareCoeff = n_DivComp(pGetCoeff(strat->B[j].lcm), pGetCoeff(Lp.lcm), currRing->cf); 1139 1140 if (compareCoeff == pDivComp_EQUAL || compare == compareCoeff) 1140 1141 { … … 1301 1302 poly m1, m2, gcd; 1302 1303 1303 d = n ExtGcd(pGetCoeff(p), pGetCoeff(strat->S[i]), &s, &t);1304 d = n_ExtGcd(pGetCoeff(p), pGetCoeff(strat->S[i]), &s, &t, currRing->cf); 1304 1305 1305 1306 if (nIsZero(s) || nIsZero(t)) // evtl. durch divBy tests ersetzen … … 2393 2394 for (j=strat->Ll; j>=0; j--) 2394 2395 { 2395 if (strat->L[j].lcm != NULL && n DivBy(pGetCoeff(strat->L[j].lcm), pGetCoeff(p)))2396 if (strat->L[j].lcm != NULL && n_DivBy(pGetCoeff(strat->L[j].lcm), pGetCoeff(p), currRing->cf)) 2396 2397 { 2397 2398 if (pCompareChain(p,strat->L[j].p1,strat->L[j].p2,strat->L[j].lcm)) … … 2446 2447 if (i < 0) break; 2447 2448 // Element is from B and has the same lcm as L[j] 2448 if ((strat->L[i].p2 == p) && n DivBy(pGetCoeff(strat->L[j].lcm), pGetCoeff(strat->L[i].lcm))2449 if ((strat->L[i].p2 == p) && n_DivBy(pGetCoeff(strat->L[j].lcm), pGetCoeff(strat->L[i].lcm), currRing->cf) 2449 2450 && pLmEqual(strat->L[j].lcm,strat->L[i].lcm)) 2450 2451 { … … 2952 2953 number gcd; 2953 2954 bool go = false; 2954 if (n DivBy((number) 0, pGetCoeff(h)))2955 if (n_DivBy((number) 0, pGetCoeff(h), currRing->cf)) 2955 2956 { 2956 2957 gcd = nIntDiv((number) 0, pGetCoeff(h)); … … 3274 3275 if (cmp == cmp_int) return an; 3275 3276 if (cmp == -cmp_int) return en; 3276 if (n DivBy(pGetCoeff(p), pGetCoeff(set[an]))) return en;3277 if (n_DivBy(pGetCoeff(p), pGetCoeff(set[an]), currRing->cf)) return en; 3277 3278 return an; 3278 3279 } … … 3283 3284 else 3284 3285 { 3285 if (n DivBy(pGetCoeff(p), pGetCoeff(set[i]))) an = i;3286 if (n_DivBy(pGetCoeff(p), pGetCoeff(set[i]), currRing->cf)) an = i; 3286 3287 else en = i; 3287 3288 } … … 4656 4657 poly p_Ln=Ln.GetLmCurrRing(); 4657 4658 poly p_With=With->GetLmCurrRing(); 4658 number z=n IntMod(pGetCoeff(p_Ln),pGetCoeff(p_With));4659 number z=n_IntMod(pGetCoeff(p_Ln),pGetCoeff(p_With), currRing->cf); 4659 4660 if (!nIsZero(z)) 4660 4661 { … … 4917 4918 if ((strat->sl>=0) 4918 4919 #ifdef HAVE_RINGS 4919 && n IsUnit(pGetCoeff(strat->S[0]))4920 && n_IsUnit(pGetCoeff(strat->S[0]),currRing->cf) 4920 4921 #endif 4921 4922 && pIsConstant(strat->S[0])) … … 5016 5017 if ((strat->Ll>=0) 5017 5018 #ifdef HAVE_RINGS 5018 && n IsUnit(pGetCoeff(strat->L[strat->Ll].p))5019 && n_IsUnit(pGetCoeff(strat->L[strat->Ll].p), currRing->cf) 5019 5020 #endif 5020 5021 && pIsConstant(strat->L[strat->Ll].p)) … … 5309 5310 if (maxIndex >= 0) 5310 5311 { 5311 e = pLDeg(h,&l,currRing)-p FDeg(h,currRing);5312 e = pLDeg(h,&l,currRing)-p_FDeg(h,currRing); 5312 5313 do 5313 5314 { … … 5326 5327 // pDelete(&h); 5327 5328 if (h == NULL) return NULL; 5328 e = pLDeg(h,&l,currRing)-p FDeg(h,currRing);5329 e = pLDeg(h,&l,currRing)-p_FDeg(h,currRing); 5329 5330 j = 0; 5330 5331 not_sev = ~ pGetShortExpVector(h); … … 6241 6242 /* compare old and new noether*/ 6242 6243 newNoether = pLmInit(strat->kHEdge); 6243 j = p FDeg(newNoether,currRing);6244 j = p_FDeg(newNoether,currRing); 6244 6245 for (i=1; i<=(currRing->N); i++) 6245 6246 { … … 6350 6351 // might be too strong 6351 6352 #ifdef HAVE_RINGS 6352 (strat->homog && pFDeg == pDeg && !(rField_is_Ring(currRing))), // TODO Oliver6353 (strat->homog && currRing->pFDeg == pDeg && !(rField_is_Ring(currRing))), // TODO Oliver 6353 6354 #else 6354 6355 (strat->homog && pFDeg == pDeg), // omit_degree … … 6486 6487 tailBin = omGetStickyBinOfBin(currRing->PolyBin); 6487 6488 #endif 6488 pOrigFDeg = pFDeg;6489 pOrigFDeg = currRing->pFDeg; 6489 6490 pOrigLDeg = pLDeg; 6490 6491 } … … 6506 6507 if (currRing != tailRing) 6507 6508 rKillModifiedRing(tailRing); 6508 pRestoreDegProcs( pOrigFDeg, pOrigLDeg);6509 pRestoreDegProcs(currRing,pOrigFDeg, pOrigLDeg); 6509 6510 } 6510 6511 … … 6755 6756 else if (strat->tailRing->pLDeg==pLDeg1c_WFirstTotalDegree) PrintS("pLDeg1c_WFirstTotalDegree"); 6756 6757 else Print("? (%lx)", (long)strat->tailRing->pLDeg); 6757 Print(" syzring:%d, syzComp(strat):%d syzComb(ring)\n",rIsSyzIndexRing(currRing),strat->syzComp,rGetCurrSyzLimit( ));6758 Print(" syzring:%d, syzComp(strat):%d syzComb(ring)\n",rIsSyzIndexRing(currRing),strat->syzComp,rGetCurrSyzLimit(currRing)); 6758 6759 if(TEST_OPT_DEGBOUND) 6759 6760 Print(" degBound: %d\n", Kstd1_deg); -
libpolys/coeffs/coeffs.h
r2cbef9 r9b3700 342 342 { assume(r != NULL); assume(r->cfIsUnit!=NULL); return r->cfIsUnit(n,r); } 343 343 344 static inline number n_ExtGcd(number a, number b, number *s, number *t, const coeffs r) 345 { assume(r != NULL); assume(r->cfExtGcd!=NULL); return r->cfExtGcd (a,b,s,t,r); } 346 347 static inline int n_DivComp(number a, number b, const coeffs r) 348 { assume(r != NULL); assume(r->cfDivComp!=NULL); return r->cfDivComp (a,b,r); } 349 344 350 /// in Z: 1 345 351 /// in Z/kZ (where k is not a prime): largest divisor of n (taken in Z) that … … 443 449 { assume(r != NULL); assume(r->cfIntDiv!=NULL); return r->cfIntDiv(a,b,r); } 444 450 451 static inline number n_IntMod(number a, number b, const coeffs r) 452 { assume(r != NULL); assume(r->cfIntMod!=NULL); return r->cfIntMod(a,b,r); } 445 453 /// @todo: Describe me!!! 446 454 ///
Note: See TracChangeset
for help on using the changeset viewer.