[e63576] | 1 | #ifndef KERNEL_NC_H |
---|
| 2 | #define KERNEL_NC_H |
---|
[80ca3c] | 3 | |
---|
[e63576] | 4 | #ifdef HAVE_PLURAL |
---|
| 5 | |
---|
[80ca3c] | 6 | #ifdef PLURAL_INTERNAL_DECLARATIONS |
---|
[e63576] | 7 | |
---|
[80ca3c] | 8 | # include <polys/nc/gb_hack.h> |
---|
[e63576] | 9 | |
---|
[80ca3c] | 10 | #else // #ifdef PLURAL_INTERNAL_DECLARATIONS |
---|
[e63576] | 11 | |
---|
[80ca3c] | 12 | # define PLURAL_INTERNAL_DECLARATIONS |
---|
| 13 | # include <polys/nc/gb_hack.h> |
---|
| 14 | # undef PLURAL_INTERNAL_DECLARATIONS |
---|
| 15 | |
---|
| 16 | #endif // #ifdef PLURAL_INTERNAL_DECLARATIONS |
---|
[e63576] | 17 | |
---|
[c7aad0] | 18 | |
---|
[80ca3c] | 19 | #include <misc/auxiliary.h> |
---|
| 20 | |
---|
| 21 | #include <polys/nc/nc.h> |
---|
| 22 | #include <polys/simpleideals.h> |
---|
| 23 | |
---|
| 24 | #include <kernel/polys.h> |
---|
| 25 | |
---|
[c7aad0] | 26 | |
---|
| 27 | |
---|
| 28 | static inline ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r) |
---|
| 29 | { |
---|
| 30 | assume(rIsPluralRing(r)); |
---|
[80ca3c] | 31 | assume(r->GetNC()->p_Procs.GB!=NULL); |
---|
| 32 | |
---|
| 33 | GB_Proc_Ptr gb = cast_A_to_B<void*, GB_Proc_Ptr>(r->GetNC()->p_Procs.GB); |
---|
| 34 | |
---|
| 35 | // NOTE: the following code block is a hack in order to make a linker to |
---|
| 36 | // believe in these functions but in reallity it should not be used. |
---|
| 37 | // Although it can also serve as an illustration for the |
---|
| 38 | // NC-initialization procedure for GB hidden away (hackedly) in |
---|
| 39 | // libpolys. |
---|
| 40 | // The only other solution would be to separate GB and the whole NC |
---|
| 41 | // subsystems from both libpolys AND kernel... which would require |
---|
| 42 | // too much effort and thus cannot be done right now. |
---|
| 43 | // Therefore this is a TODO for a future (large-scale) cleanup. |
---|
| 44 | if( gb == NULL) |
---|
[c7aad0] | 45 | { |
---|
[64f0ca] | 46 | if( rIsSCA(r) ) |
---|
| 47 | { |
---|
| 48 | if (rHasLocalOrMixedOrdering(r)) |
---|
| 49 | gb = sca_mora; |
---|
| 50 | else |
---|
| 51 | gb = sca_bba; // sca_gr_bba??? |
---|
| 52 | } else |
---|
| 53 | { |
---|
[80ca3c] | 54 | if (rHasLocalOrMixedOrdering(r)) |
---|
| 55 | gb = gnc_gr_mora; |
---|
| 56 | else |
---|
| 57 | gb = gnc_gr_bba; |
---|
[64f0ca] | 58 | } |
---|
[80ca3c] | 59 | |
---|
| 60 | r->GetNC()->p_Procs.GB = cast_A_to_vptr(gb); |
---|
[c7aad0] | 61 | } |
---|
[e63576] | 62 | |
---|
[80ca3c] | 63 | return gb(F, Q, w, hilb, strat, r); |
---|
| 64 | } |
---|
[e63576] | 65 | |
---|
[80ca3c] | 66 | /// Compute two-sided GB: |
---|
| 67 | ideal twostd(ideal I); |
---|
[e63576] | 68 | |
---|
[80ca3c] | 69 | /// Ann: ??? |
---|
| 70 | ideal Approx_Step(ideal L); |
---|
[e63576] | 71 | |
---|
| 72 | #endif // HAVE_PLURAL |
---|
[80ca3c] | 73 | |
---|
[24a614b] | 74 | #endif // KERNEL_NC_H |
---|