nc.h
Go to the documentation of this file.
1 #ifndef KERNEL_NC_H
2 #define KERNEL_NC_H
3 
4 #ifdef HAVE_PLURAL
5 
6 #ifdef PLURAL_INTERNAL_DECLARATIONS
7 
8 # include <polys/nc/gb_hack.h>
9 
10 #else // #ifdef PLURAL_INTERNAL_DECLARATIONS
11 
12 # define PLURAL_INTERNAL_DECLARATIONS
13 # include <polys/nc/gb_hack.h>
14 # undef PLURAL_INTERNAL_DECLARATIONS
15 
16 #endif // #ifdef PLURAL_INTERNAL_DECLARATIONS
17 
18 
19 #include <misc/auxiliary.h>
20 
21 #include <polys/nc/nc.h>
22 #include <polys/simpleideals.h>
23 
24 #include <kernel/polys.h>
25 
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 {
31  assume(r->GetNC()->p_Procs.GB!=NULL);
32 
33  BBA_Proc gb = cast_A_to_B<void*, BBA_Proc>(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)
45  {
46  if( rIsSCA(r) )
47  {
49  gb = sca_mora;
50  else
51  gb = sca_bba; // sca_gr_bba???
52  } else
53  {
55  gb = gnc_gr_mora;
56  else
57  gb = gnc_gr_bba;
58  }
59 
60  r->GetNC()->p_Procs.GB = cast_A_to_vptr(gb);
61  }
62 
63  return gb(F, Q, w, hilb, strat, r);
64 }
65 
66 /// Compute two-sided GB:
67 ideal twostd(ideal I);
68 
69 /// Ann: ???
70 ideal Approx_Step(ideal L);
71 
72 #endif // HAVE_PLURAL
73 
74 #endif // KERNEL_NC_H
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:753
BBA_Proc sca_mora
Definition: old.gring.cc:76
ideal(* BBA_Proc)(const ideal, const ideal, const intvec *, const intvec *, kStrategy strat, const ring)
Definition: ring.h:206
Compatiblity layer for legacy polynomial operations (over currRing)
#define Q
Definition: sirandom.c:25
static bool rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:361
ideal Approx_Step(ideal L)
Ann: ???
Definition: nc.cc:254
BBA_Proc gnc_gr_bba
Definition: old.gring.cc:73
const ring r
Definition: syzextra.cc:208
Definition: intvec.h:16
BBA_Proc sca_bba
Definition: old.gring.cc:75
BBA_Proc gnc_gr_mora
Definition: old.gring.cc:74
#define assume(x)
Definition: mod2.h:405
All the auxiliary stuff.
int int kStrategy strat
Definition: myNF.cc:68
#define NULL
Definition: omList.c:10
void * cast_A_to_vptr(A a)
Definition: auxiliary.h:442
const CanonicalForm & w
Definition: facAbsFact.cc:55
static bool rIsSCA(const ring r)
Definition: nc.h:206
static ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r)
Definition: nc.h:28
ideal twostd(ideal I)
Compute two-sided GB:
Definition: nc.cc:22