Changeset 37a4c3 in git for kernel/shiftgb.cc
- Timestamp:
- Feb 15, 2008, 6:14:23 PM (15 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 7d0cbb00ebc403b3845a38cbf3185e95e99cc015
- Parents:
- 8cf4f3f04ec8ee4482f27f11b0444a3edf84fd3c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/shiftgb.cc
r8cf4f3f r37a4c3 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: shiftgb.cc,v 1. 3 2007-11-06 12:58:35 SingularExp $ */4 /* $Id: shiftgb.cc,v 1.4 2008-02-15 17:14:23 levandov Exp $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for shift GB and free GB … … 43 43 /* assume shift takes place */ 44 44 /* shifts the poly p by sh */ 45 /* deletes p */ 45 46 46 47 /* assume sh and uptodeg agree */ … … 49 50 50 51 poly q = NULL; 51 poly pp = p Copy(p);52 poly pp = p; // pCopy(p); 52 53 while (pp!=NULL) 53 54 { … … 97 98 pSetExpV(m,s); 98 99 /* pSetm(m); */ /* done in the pSetExpV */ 100 /* think on the component */ 99 101 pSetCoeff0(m,c); 100 102 freeT(e, currRing->N); … … 107 109 /* returns the number of maximal block */ 108 110 /* appearing among the monomials of p */ 109 poly q = pCopy(p); /* need it ? */ 111 /* the 0th block is the 1st one */ 112 poly q = p_Copy(p,currRing); /* need it ? */ 110 113 int ans = 0; 111 114 int ansnew = 0; … … 132 135 { 133 136 #ifdef PDEBUG 134 Print("pmLastVblock: unexpected zero exponent"); 137 Print("pmLastVblock: unexpected zero exponent vector"); 138 PrintLn(); 135 139 #endif 136 140 return(j); … … 161 165 } 162 166 j = b; 163 while ( (!B[j]) && (j>=1)) j--; 167 // while ( (!B[j]) && (j>=1)) j--; 168 for (j=b; j>=1; j--) 169 { 170 if (B[j]!=0) break; 171 } 172 164 173 if (j==0) 165 174 { … … 180 189 /* shiftgb stuff */ 181 190 182 void initBbaShift(ideal F,kStrategy strat)183 {184 int i;185 idhdl h;186 /* setting global variables ------------------- */187 strat->enterS = enterSBba;188 191 189 strat->red = redFirstShift; 192 /* remarks: cleanT : just deletion 193 enlargeT: just reallocation */ 190 194 191 /* perhaps the following?192 * strat->LazyPass *=4;193 * strat->red = redHomogShift;194 */195 196 /* strat->red = redHoney;197 * if (strat->honey)198 * strat->red = redHoney;199 * else if (pLexOrder && !strat->homog)200 * strat->red = redLazy;201 * else202 * {203 * strat->LazyPass *=4;204 * strat->red = redHomog;205 * }206 *#ifdef HAVE_RINGS //TODO Oliver207 * if (rField_is_Ring(currRing)) {208 * strat->red = redRing2toM;209 * }210 *#endif211 */212 213 if (pLexOrder && strat->honey)214 strat->initEcart = initEcartNormal;215 else216 strat->initEcart = initEcartBBA;217 if (strat->honey)218 strat->initEcartPair = initEcartPairMora;219 else220 strat->initEcartPair = initEcartPairBba;221 strat->kIdeal = NULL;222 //if (strat->ak==0) strat->kIdeal->rtyp=IDEAL_CMD;223 //else strat->kIdeal->rtyp=MODUL_CMD;224 //strat->kIdeal->data=(void *)strat->Shdl;225 if ((TEST_OPT_WEIGHTM)&&(F!=NULL))226 {227 //interred machen Aenderung228 pFDegOld=pFDeg;229 pLDegOld=pLDeg;230 //h=ggetid("ecart");231 //if ((h!=NULL) /*&& (IDTYP(h)==INTVEC_CMD)*/)232 //{233 // ecartWeights=iv2array(IDINTVEC(h));234 //}235 //else236 {237 ecartWeights=(short *)omAlloc((pVariables+1)*sizeof(short));238 /*uses automatic computation of the ecartWeights to set them*/239 kEcartWeights(F->m,IDELEMS(F)-1,ecartWeights);240 }241 pRestoreDegProcs(totaldegreeWecart, maxdegreeWecart);242 if (TEST_OPT_PROT)243 {244 for(i=1; i<=pVariables; i++)245 Print(" %d",ecartWeights[i]);246 PrintLn();247 mflush();248 }249 }250 }251 195 #endif
Note: See TracChangeset
for help on using the changeset viewer.