| 198 | } |
| 199 | |
| 200 | static ideal idGroebner(ideal temp,int syzComp,GbVariant alg, intvec* hilb=NULL, intvec* w=NULL, tHomog hom=testHomog) |
| 201 | { |
| 202 | //Print("syz=%d\n",syzComp); |
| 203 | //PrintS(showOption()); |
| 204 | //PrintLn(); |
| 205 | ideal res=NULL; |
| 206 | if (w==NULL) |
| 207 | { |
| 208 | if (hom==testHomog) |
| 209 | hom=(tHomog)idHomModule(temp,currRing->qideal,&w); //sets w to weight vector or NULL |
| 210 | } |
| 211 | else |
| 212 | { |
| 213 | w=ivCopy(w); |
| 214 | hom=isHomog; |
| 215 | } |
| 216 | #ifdef HAVE_SHIFTBBA |
| 217 | if (rIsLPRing(currRing)) alg = GbStd; |
| 218 | #endif |
| 219 | if ((alg==GbStd)||(alg==GbDefault)) |
| 220 | { |
| 221 | if (TEST_OPT_PROT &&(alg==GbStd)) { PrintS("std:"); mflush(); } |
| 222 | res = kStd(temp,currRing->qideal,hom,&w,hilb,syzComp); |
| 223 | idDelete(&temp); |
| 224 | } |
| 225 | else if (alg==GbSlimgb) |
| 226 | { |
| 227 | if (TEST_OPT_PROT) { PrintS("slimgb:"); mflush(); } |
| 228 | res = t_rep_gb(currRing, temp, syzComp); |
| 229 | idDelete(&temp); |
| 230 | } |
| 231 | else if (alg==GbGroebner) |
| 232 | { |
| 233 | if (TEST_OPT_PROT) { PrintS("groebner:"); mflush(); } |
| 234 | BOOLEAN err; |
| 235 | res=(ideal)iiCallLibProc1("groebner",temp,MODUL_CMD,err); |
| 236 | if (err) |
| 237 | { |
| 238 | Werror("error %d in >>groebner<<",err); |
| 239 | res=idInit(1,1); |
| 240 | } |
| 241 | } |
| 242 | else if (alg==GbModstd) |
| 243 | { |
| 244 | if (TEST_OPT_PROT) { PrintS("modStd:"); mflush(); } |
| 245 | BOOLEAN err; |
| 246 | void *args[]={temp,(void*)1,NULL}; |
| 247 | int arg_t[]={MODUL_CMD,INT_CMD,0}; |
| 248 | leftv temp0=ii_CallLibProcM("modStd",args,arg_t,currRing,err); |
| 249 | res=(ideal)temp0->data; |
| 250 | omFreeBin((ADDRESS)temp0,sleftv_bin); |
| 251 | if (err) |
| 252 | { |
| 253 | Werror("error %d in >>modStd<<",err); |
| 254 | res=idInit(1,1); |
| 255 | } |
| 256 | } |
| 257 | else if (alg==GbSba) |
no test coverage detected