Changeset e57255 in git for kernel/kstd1.cc
- Timestamp:
- Dec 16, 2013, 3:12:47 PM (10 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- d186d3baff30f2e6e96b2a354ff156ec286fcb4ef24b9c65dd9d2b3d937e5841295580dedc2f7412
- Parents:
- 27877c10cae6d5eb945d62a27d66dfdf8a5a47849e8ae12733559521215c7641624da588f2d8cdf3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kstd1.cc
r9e8ae12 re57255 2969 2969 2970 2970 // enter into S, L, and T 2971 //if ((!TEST_OPT_IDLIFT) || (pGetComp(strat->P.p) <= strat->syzComp)) 2971 if ((!TEST_OPT_IDLIFT) || (pGetComp(strat->P.p) <= strat->syzComp)) 2972 { 2972 2973 enterT(strat->P, strat); 2973 // posInS only depends on the leading term 2974 strat->enterS(strat->P, pos, strat, strat->tl); 2975 2974 // posInS only depends on the leading term 2975 strat->enterS(strat->P, pos, strat, strat->tl); 2976 2977 if (pos<strat->sl) 2978 { 2979 need_retry++; 2980 // move all "larger" elements fromS to L 2981 // remove them from T 2982 int ii=pos+1; 2983 for(;ii<=strat->sl;ii++) 2984 { 2985 LObject h; 2986 memset(&h,0,sizeof(h)); 2987 h.tailRing=strat->tailRing; 2988 h.p=strat->S[ii]; strat->S[ii]=NULL; 2989 strat->initEcart(&h); 2990 h.sev=strat->sevS[ii]; 2991 int jj=strat->tl; 2992 while (jj>=0) 2993 { 2994 if (strat->T[jj].p==h.p) 2995 { 2996 strat->T[jj].p=NULL; 2997 if (jj<strat->tl) 2998 { 2999 memmove(&(strat->T[jj]),&(strat->T[jj+1]), 3000 (strat->tl-jj)*sizeof(strat->T[jj])); 3001 memmove(&(strat->sevT[jj]),&(strat->sevT[jj+1]), 3002 (strat->tl-jj)*sizeof(strat->sevT[jj])); 3003 } 3004 strat->tl--; 3005 break; 3006 } 3007 jj--; 3008 } 3009 int lpos=strat->posInL(strat->L,strat->Ll,&h,strat); 3010 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,lpos); 3011 #ifdef KDEBUG 3012 if (TEST_OPT_DEBUG) 3013 { 3014 Print("move S[%d] -> L[%d]: ",ii,pos); 3015 p_wrp(h.p,currRing, strat->tailRing); 3016 PrintLn(); 3017 } 3018 #endif 3019 } 3020 if (strat->fromQ!=NULL) 3021 { 3022 for(ii=pos+1;ii<=strat->sl;ii++) strat->fromQ[ii]=0; 3023 } 3024 strat->sl=pos; 3025 } 3026 } 3027 else 3028 { 3029 // clean P 3030 } 2976 3031 if (strat->P.lcm!=NULL) 2977 3032 #ifdef HAVE_RINGS … … 2980 3035 pLmFree(strat->P.lcm); 2981 3036 #endif 2982 if (pos<strat->sl)2983 {2984 need_retry++;2985 // move all "larger" elements fromS to L2986 // remove them from T2987 int ii=pos+1;2988 for(;ii<=strat->sl;ii++)2989 {2990 LObject h;2991 memset(&h,0,sizeof(h));2992 h.tailRing=strat->tailRing;2993 h.p=strat->S[ii]; strat->S[ii]=NULL;2994 strat->initEcart(&h);2995 h.sev=strat->sevS[ii];2996 int jj=strat->tl;2997 while (jj>=0)2998 {2999 if (strat->T[jj].p==h.p)3000 {3001 strat->T[jj].p=NULL;3002 if (jj<strat->tl)3003 {3004 memmove(&(strat->T[jj]),&(strat->T[jj+1]),3005 (strat->tl-jj)*sizeof(strat->T[jj]));3006 memmove(&(strat->sevT[jj]),&(strat->sevT[jj+1]),3007 (strat->tl-jj)*sizeof(strat->sevT[jj]));3008 }3009 strat->tl--;3010 break;3011 }3012 jj--;3013 }3014 int lpos=strat->posInL(strat->L,strat->Ll,&h,strat);3015 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,lpos);3016 #ifdef KDEBUG3017 if (TEST_OPT_DEBUG)3018 {3019 Print("move S[%d] -> L[%d]: ",ii,pos);3020 p_wrp(h.p,currRing, strat->tailRing);3021 PrintLn();3022 }3023 #endif3024 }3025 if (strat->fromQ!=NULL)3026 {3027 for(ii=pos+1;ii<=strat->sl;ii++) strat->fromQ[ii]=0;3028 }3029 strat->sl=pos;3030 }3031 3037 } 3032 3038
Note: See TracChangeset
for help on using the changeset viewer.