Loading...
Searching...
No Matches
nc.h
Go to the documentation of this file.
#ifndef KERNEL_NC_H
#define KERNEL_NC_H
#include "kernel/mod2.h"
#ifdef HAVE_PLURAL
#ifdef PLURAL_INTERNAL_DECLARATIONS
# include "polys/nc/gb_hack.h"
#else // #ifdef PLURAL_INTERNAL_DECLARATIONS
# define PLURAL_INTERNAL_DECLARATIONS
# include "polys/nc/gb_hack.h"
# undef PLURAL_INTERNAL_DECLARATIONS
#endif // #ifdef PLURAL_INTERNAL_DECLARATIONS
#include "polys/nc/nc.h"
#include "polys/simpleideals.h"
#include "kernel/polys.h"
static inline ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const bigintmat *hilb, kStrategy strat, const ring r)
{
assume(rIsPluralRing(r));
assume(r->GetNC()->p_Procs.GB!=NULL);
BBA_Proc gb = cast_A_to_B<void*, BBA_Proc>(r->GetNC()->p_Procs.GB);
// NOTE: the following code block is a hack in order to make a linker to
// believe in these functions but in reallity it should not be used.
// Although it can also serve as an illustration for the
// NC-initialization procedure for GB hidden away (hackedly) in
// libpolys.
// The only other solution would be to separate GB and the whole NC
// subsystems from both libpolys AND kernel... which would require
// too much effort and thus cannot be done right now.
// Therefore this is a TODO for a future (large-scale) cleanup.
if( gb == NULL)
{
if( rIsSCA(r) )
{
if (rHasLocalOrMixedOrdering(r))
gb = sca_mora;
else
gb = sca_bba; // sca_gr_bba???
} else
{
if (rHasLocalOrMixedOrdering(r))
gb = gnc_gr_mora;
else
gb = gnc_gr_bba;
}
r->GetNC()->p_Procs.GB = cast_A_to_vptr(gb);
}
return gb(F, Q, w, hilb, strat, r);
}
/// Compute two-sided GB:
ideal twostd(ideal I);
/// Ann: ???
ideal Approx_Step(ideal L);
#endif // HAVE_PLURAL
#endif // KERNEL_NC_H
cast_A_to_B
B cast_A_to_B(A a)
Definition auxiliary.h:373
cast_A_to_vptr
void * cast_A_to_vptr(A a)
Definition auxiliary.h:386
bigintmat
Matrices of numbers.
Definition bigintmat.h:51
intvec
Definition intvec.h:24
w
const CanonicalForm & w
Definition facAbsFact.cc:51
gb_hack.h
gnc_gr_bba
EXTERN_VAR BBA_Proc gnc_gr_bba
Definition gb_hack.h:10
gnc_gr_mora
EXTERN_VAR BBA_Proc gnc_gr_mora
Definition gb_hack.h:10
sca_mora
EXTERN_VAR BBA_Proc sca_mora
Definition gb_hack.h:10
sca_bba
EXTERN_VAR BBA_Proc sca_bba
Definition gb_hack.h:10
Approx_Step
ideal Approx_Step(ideal L)
Ann: ???
Definition nc.cc:250
twostd
ideal twostd(ideal I)
Compute two-sided GB:
Definition nc.cc:18
nc_GB
static ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const bigintmat *hilb, kStrategy strat, const ring r)
Definition nc.h:27
nc.h
rIsSCA
static bool rIsSCA(const ring r)
Definition nc.h:190
mod2.h
assume
#define assume(x)
Definition mod2.h:389
NULL
#define NULL
Definition omList.c:12
polys.h
Compatibility layer for legacy polynomial operations (over currRing).
rHasLocalOrMixedOrdering
static BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition ring.h:769
rIsPluralRing
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition ring.h:406
BBA_Proc
ideal(* BBA_Proc)(const ideal, const ideal, const intvec *, const bigintmat *, kStrategy strat, const ring)
Definition ring.h:250
simpleideals.h
Q
#define Q
Definition sirandom.c:26
kStrategy
skStrategy * kStrategy
Definition structs.h:54