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  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)
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: ???
71 
72 #endif // HAVE_PLURAL
73 
74 #endif // KERNEL_NC_H
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:742
Compatiblity layer for legacy polynomial operations (over currRing)
const ideal
Definition: gb_hack.h:42
ideal gnc_gr_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
Definition: gr_kstd2.cc:1052
#define Q
Definition: sirandom.c:25
static bool rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:355
ideal Approx_Step(ideal L)
Ann: ???
Definition: nc.cc:254
ideal sca_mora(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
Modified modern Sinuglar Mora's algorithm.
Definition: sca.cc:899
ideal(* GB_Proc_Ptr)(const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring)
Definition: gb_hack.h:15
const ring r
Definition: syzextra.cc:208
Definition: intvec.h:16
#define assume(x)
Definition: mod2.h:405
All the auxiliary stuff.
kStrategy strat
Definition: myNF.cc:319
#define NULL
Definition: omList.c:10
void * cast_A_to_vptr(A a)
Definition: auxiliary.h:442
const CanonicalForm & w
Definition: facAbsFact.cc:55
ideal gnc_gr_mora(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
Definition: gr_kstd2.cc:1314
static bool rIsSCA(const ring r)
Definition: nc.h:206
ideal sca_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
Modified modern Sinuglar Buchberger's algorithm.
Definition: sca.cc:375
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