Changeset 5222d2a in git
- Timestamp:
- Dec 22, 2013, 11:25:06 PM (9 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- ca326f706fd98143096fe2915a0c449e430c157d
- Parents:
- 88c726094b0406a43f64b51105e892d707306874
- git-author:
- Yue Ren <ren@mathematik.uni-kl.de>2013-12-22 23:25:06+01:00
- git-committer:
- Yue Ren <ren@mathematik.uni-kl.de>2015-02-06 13:47:02+01:00
- Files:
-
- 1 added
- 1 edited
- 1 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/gfanlib/tropical.cc
r88c726 r5222d2a 5 5 #include <bbcone.h> 6 6 7 #include <initialReduction.h> 7 #include <ppinitialReduction.h> 8 #include <ttinitialReduction.h> 8 9 9 10 poly initial(poly p) … … 469 470 p->iiAddCproc("","reduceInitially3",FALSE,reduceInitially3); 470 471 p->iiAddCproc("","reduceInitially4",FALSE,reduceInitially4); 472 p->iiAddCproc("","ttpReduce",FALSE,pReduce); 471 473 #endif //NDEBUG 472 474 p->iiAddCproc("","reduceInitially",FALSE,reduceInitially); -
dyn_modules/callgfanlib/ttinitialReduction.cc
r88c726 r5222d2a 7 7 #include <map> 8 8 #include <set> 9 10 #define KEEP_COEFF_SMALL 1 9 11 10 12 /*** … … 27 29 for (gCache = g; gCache; pIter(gCache)) 28 30 if (p_LeadmonomDivisibleBy(gCache,toBeChecked,currRing)) break; 29 if (gCache) 30 { 31 n_Power(p,p_GetExp(toBeChecked,1,currRing)-p_GetExp(gCache,1,currRing),&pPower,currRing->cf); 32 coeff = n_Mult(p_GetCoeff(toBeChecked,currRing),pPower,currRing->cf); 33 p_SetCoeff(gCache,n_Add(p_GetCoeff(gCache,currRing),coeff,currRing->cf),currRing); 34 n_Delete(&pPower,currRing->cf); n_Delete(&coeff,currRing->cf); 35 toBeChecked=p_LmDeleteAndNext(toBeChecked,currRing); 36 } 37 else 31 if (!gCache) 38 32 { 39 33 if (n_DivBy(p_GetCoeff(toBeChecked,currRing),p,currRing->cf)) … … 61 55 else 62 56 { 57 #ifdef KEEP_COEFF_SMALL 58 if (n_Greater(p_GetCoeff(toBeChecked,currRing),p,currRing->cf)) 59 { 60 coeff = n_IntDiv(p_GetCoeff(toBeChecked,currRing),p,currRing->cf); 61 p_SetCoeff(toBeChecked, 62 n_IntMod(p_GetCoeff(toBeChecked,currRing),p,currRing->cf), 63 currRing); 64 subst = p_LmInit(toBeChecked,currRing); 65 p_AddExp(subst,1,1,currRing); 66 p_SetCoeff(subst,coeff,currRing); 67 p_Setm(subst,currRing); pTest(subst); 68 pNext(toBeChecked)=p_Add_q(pNext(toBeChecked),subst,currRing); 69 pTest(toBeChecked); 70 } 71 #endif 63 72 pNext(gEnd)=toBeChecked; 64 73 pIter(gEnd); pIter(toBeChecked); … … 72 81 73 82 #ifndef NDEBUG 74 BOOLEAN pReduce(leftv res, leftv args)83 BOOLEAN ttpReduce(leftv res, leftv args) 75 84 { 76 85 leftv u = args; … … 97 106 98 107 108 #if 0 99 109 /*** 100 110 * reduces h initially with respect to g, … … 598 608 return TRUE; 599 609 } 610 611 #endif
Note: See TracChangeset
for help on using the changeset viewer.