My Project
Loading...
Searching...
No Matches
nc.h
Go to the documentation of this file.
1#ifndef KERNEL_NC_H
2#define KERNEL_NC_H
3
4#include "kernel/mod2.h"
5
6#ifdef HAVE_PLURAL
7
8#ifdef PLURAL_INTERNAL_DECLARATIONS
9
10# include "polys/nc/gb_hack.h"
11
12#else // #ifdef PLURAL_INTERNAL_DECLARATIONS
13
14# define PLURAL_INTERNAL_DECLARATIONS
15# include "polys/nc/gb_hack.h"
16# undef PLURAL_INTERNAL_DECLARATIONS
17
18#endif // #ifdef PLURAL_INTERNAL_DECLARATIONS
19
20#include "polys/nc/nc.h"
21#include "polys/simpleideals.h"
22
23#include "kernel/polys.h"
24
25
26
27static inline ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r)
28{
30 assume(r->GetNC()->p_Procs.GB!=NULL);
31
32 BBA_Proc gb = cast_A_to_B<void*, BBA_Proc>(r->GetNC()->p_Procs.GB);
33
34 // NOTE: the following code block is a hack in order to make a linker to
35 // believe in these functions but in reallity it should not be used.
36 // Although it can also serve as an illustration for the
37 // NC-initialization procedure for GB hidden away (hackedly) in
38 // libpolys.
39 // The only other solution would be to separate GB and the whole NC
40 // subsystems from both libpolys AND kernel... which would require
41 // too much effort and thus cannot be done right now.
42 // Therefore this is a TODO for a future (large-scale) cleanup.
43 if( gb == NULL)
44 {
45 if( rIsSCA(r) )
46 {
48 gb = sca_mora;
49 else
50 gb = sca_bba; // sca_gr_bba???
51 } else
52 {
54 gb = gnc_gr_mora;
55 else
56 gb = gnc_gr_bba;
57 }
58
59 r->GetNC()->p_Procs.GB = cast_A_to_vptr(gb);
60 }
61
62 return gb(F, Q, w, hilb, strat, r);
63}
64
65/// Compute two-sided GB:
66ideal twostd(ideal I);
67
68/// Ann: ???
69ideal Approx_Step(ideal L);
70
71#endif // HAVE_PLURAL
72
73#endif // KERNEL_NC_H
void * cast_A_to_vptr(A a)
Definition: auxiliary.h:385
Definition: intvec.h:23
const CanonicalForm & w
Definition: facAbsFact.cc:51
EXTERN_VAR BBA_Proc gnc_gr_bba
Definition: gb_hack.h:10
EXTERN_VAR BBA_Proc gnc_gr_mora
Definition: gb_hack.h:10
EXTERN_VAR BBA_Proc sca_mora
Definition: gb_hack.h:10
EXTERN_VAR BBA_Proc sca_bba
Definition: gb_hack.h:10
ideal Approx_Step(ideal L)
Ann: ???
Definition: nc.cc:250
static ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r)
Definition: nc.h:27
ideal twostd(ideal I)
Compute two-sided GB:
Definition: nc.cc:18
static bool rIsSCA(const ring r)
Definition: nc.h:190
#define assume(x)
Definition: mod2.h:389
#define NULL
Definition: omList.c:12
Compatibility layer for legacy polynomial operations (over currRing)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:400
ideal(* BBA_Proc)(const ideal, const ideal, const intvec *, const intvec *, kStrategy strat, const ring)
Definition: ring.h:244
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:760
#define Q
Definition: sirandom.c:26