| 2965 | } |
| 2966 | |
| 2967 | ideal sba (ideal F0, ideal Q,intvec *w,intvec *hilb,kStrategy strat) |
| 2968 | { |
| 2969 | // ring order stuff: |
| 2970 | // in sba we have (until now) two possibilities: |
| 2971 | // 1. an incremental computation w.r.t. (C,monomial order) |
| 2972 | // 2. a (possibly non-incremental) computation w.r.t. the |
| 2973 | // induced Schreyer order. |
| 2974 | // The corresponding orders are computed in sbaRing(), depending |
| 2975 | // on the flag strat->sbaOrder |
| 2976 | #if SBA_PRINT_ZERO_REDUCTIONS |
| 2977 | long zeroreductions = 0; |
| 2978 | #endif |
| 2979 | #if SBA_PRINT_PRODUCT_CRITERION |
| 2980 | long product_criterion = 0; |
| 2981 | #endif |
| 2982 | #if SBA_PRINT_SIZE_G |
| 2983 | int size_g = 0; |
| 2984 | int size_g_non_red = 0; |
| 2985 | #endif |
| 2986 | #if SBA_PRINT_SIZE_SYZ |
| 2987 | long size_syz = 0; |
| 2988 | #endif |
| 2989 | // global variable |
| 2990 | #if SBA_PRINT_REDUCTION_STEPS |
| 2991 | sba_reduction_steps = 0; |
| 2992 | sba_interreduction_steps = 0; |
| 2993 | #endif |
| 2994 | #if SBA_PRINT_OPERATIONS |
| 2995 | sba_operations = 0; |
| 2996 | sba_interreduction_operations = 0; |
| 2997 | #endif |
| 2998 | |
| 2999 | ideal F1 = F0; |
| 3000 | ring sRing, currRingOld; |
| 3001 | currRingOld = currRing; |
| 3002 | if (strat->sbaOrder == 1 || strat->sbaOrder == 3) |
| 3003 | { |
| 3004 | sRing = sbaRing(strat); |
| 3005 | if (sRing!=currRingOld) |
| 3006 | { |
| 3007 | rChangeCurrRing (sRing); |
| 3008 | F1 = idrMoveR (F0, currRingOld, currRing); |
| 3009 | } |
| 3010 | } |
| 3011 | ideal F; |
| 3012 | // sort ideal F |
| 3013 | //Put the SigDrop element on the correct position (think of sbaEnterS) |
| 3014 | //We also sort them |
| 3015 | if(rField_is_Ring(currRing) && strat->sigdrop) |
| 3016 | { |
| 3017 | #if 1 |
| 3018 | F = idInit(IDELEMS(F1),F1->rank); |
| 3019 | for (int i=0; i<IDELEMS(F1);++i) |
| 3020 | F->m[i] = F1->m[i]; |
| 3021 | if(strat->sbaEnterS >= 0) |
| 3022 | { |
| 3023 | poly dummy; |
| 3024 | dummy = pCopy(F->m[0]); //the sigdrop element |
no test coverage detected