Changeset aa7c1c2 in git for kernel/GBEngine/kutil.cc
- Timestamp:
- Jun 14, 2018, 1:08:24 PM (6 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 8c73fdea988c87d699605750b3180fa69edf5d10
- Parents:
- a718906498691a0860e186cfee5db4fc1142ccd6db48f3ea705fcb451c2ea640a2b72f643bae2f22
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kutil.cc
ra718906 raa7c1c2 10971 10971 void finalReduceByMon(kStrategy strat) 10972 10972 { 10973 assume(strat->tl<0); /* can only be called with no elements in T: 10974 i.e. after exitBuchMora */ 10975 /* do not use strat->S, strat->sl as they may be out of sync*/ 10973 10976 if(!nCoeff_is_Ring_Z(currRing->cf)) 10974 10977 return; 10975 10978 poly p,pp; 10976 for(int j = 0; j< =strat->sl; j++)10977 { 10978 if((strat->S [j]!=NULL)&&(pNext(strat->S[j]) == NULL))10979 { 10980 for(int i = 0; i< =strat->sl; i++)10981 { 10982 if((i != j) && (strat->S [i] != NULL))10983 { 10984 p = strat->S [i];10985 if(pLmDivisibleBy(strat->S[j], p))10979 for(int j = 0; j<IDELEMS(strat->Shdl); j++) 10980 { 10981 if((strat->Shdl->m[j]!=NULL)&&(pNext(strat->Shdl->m[j]) == NULL)) 10982 { 10983 for(int i = 0; i<IDELEMS(strat->Shdl); i++) 10984 { 10985 if((i != j) && (strat->Shdl->m[i] != NULL)) 10986 { 10987 p = strat->Shdl->m[i]; 10988 while((p!=NULL) && pLmDivisibleBy(strat->Shdl->m[j], p)) 10986 10989 { 10987 number dummy = n_IntMod(p->coef, strat->S[j]->coef, currRing->cf); 10988 p_SetCoeff(p,dummy,currRing); 10990 number dummy = n_IntMod(p->coef, strat->Shdl->m[j]->coef, currRing->cf); 10991 if (!nEqual(dummy,p->coef)) 10992 { 10993 if (nIsZero(dummy)) 10994 { 10995 nDelete(&dummy); 10996 pLmDelete(&strat->Shdl->m[i]); 10997 p=strat->Shdl->m[i]; 10998 } 10999 else 11000 { 11001 p_SetCoeff(p,dummy,currRing); 11002 break; 11003 } 11004 } 11005 else 11006 { 11007 nDelete(&dummy); 11008 break; 11009 } 10989 11010 } 10990 pp = pNext(p); 10991 if((pp == NULL) && (nIsZero(p->coef))) 11011 if (p!=NULL) 10992 11012 { 10993 deleteInS(i, strat); 10994 } 10995 else 10996 { 11013 pp = pNext(p); 10997 11014 while(pp != NULL) 10998 11015 { 10999 if(pLmDivisibleBy(strat->S [j], pp))11016 if(pLmDivisibleBy(strat->Shdl->m[j], pp)) 11000 11017 { 11001 number dummy = n_IntMod(pp->coef, strat->S[j]->coef, currRing->cf); 11002 p_SetCoeff(pp,dummy,currRing); 11003 if(nIsZero(pp->coef)) 11018 number dummy = n_IntMod(pp->coef, strat->Shdl->m[j]->coef, currRing->cf); 11019 if (!nEqual(dummy,pp->coef)) 11004 11020 { 11005 pLmDelete(&pNext(p)); 11006 pp = pNext(p); 11021 p_SetCoeff(pp,dummy,currRing); 11022 if(nIsZero(pp->coef)) 11023 { 11024 pLmDelete(&pNext(p)); 11025 pp = pNext(p); 11026 } 11027 else 11028 { 11029 p = pp; 11030 pp = pNext(p); 11031 } 11007 11032 } 11008 11033 else 11009 11034 { 11035 nDelete(&dummy); 11010 11036 p = pp; 11011 11037 pp = pNext(p); … … 11019 11045 } 11020 11046 } 11021 if(strat->S[i]!= NULL && nIsZero(pGetCoeff(strat->S[i])))11022 {11023 if(pNext(strat->S[i]) == NULL)11024 strat->S[i]=NULL;11025 else11026 strat->S[i]=pNext(strat->S[i]);11027 }11028 11047 } 11029 11048 } … … 11031 11050 } 11032 11051 } 11033 //idSkipZeroes(strat->Shdl);11052 idSkipZeroes(strat->Shdl); 11034 11053 } 11035 11054 #endif
Note: See TracChangeset
for help on using the changeset viewer.