| 242 | #endif |
| 243 | |
| 244 | void khCheckLocInhom(ideal Q, intvec *w, intvec *hilb, int &count, |
| 245 | kStrategy strat) |
| 246 | |
| 247 | /* |
| 248 | This will be used for the local orderings in the case of the inhomogeneous ideals. |
| 249 | Assume f1,...,fs are already in the standard basis. Test if hilb(LM(f1),...,LM(fs),1) |
| 250 | is equal to the inputted one. |
| 251 | If no, do nothing. |
| 252 | If Yes, we know that all polys that we need are already in the standard basis |
| 253 | so delete all the remaining pairs |
| 254 | */ |
| 255 | { |
| 256 | ideal Lm; |
| 257 | intvec *newhilb; |
| 258 | |
| 259 | Lm = id_Head(strat->Shdl,currRing); |
| 260 | |
| 261 | newhilb =hFirstSeries(Lm,w,Q,strat->kHomW); |
| 262 | |
| 263 | if(newhilb->compare(hilb) == 0) |
| 264 | { |
| 265 | while (strat->Ll>=0) |
| 266 | { |
| 267 | count++; |
| 268 | if(TEST_OPT_PROT) |
| 269 | { |
| 270 | PrintS("h"); |
| 271 | mflush(); |
| 272 | } |
| 273 | deleteInL(strat->L,&strat->Ll,strat->Ll,strat); |
| 274 | } |
| 275 | delete newhilb; |
| 276 | return; |
| 277 | } |
| 278 | id_Delete(&Lm,currRing); |
| 279 | } |