source: git/kernel/nc.h @ 64f0ca

spielwiese
Last change on this file since 64f0ca was 64f0ca, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
proper hack for SCA fix: SCA test + initialization fix: GB over a SCA add: "ring-dependent" wrapper of kNF (for SCA test)
  • Property mode set to 100644
File size: 1.7 KB
Line 
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
28static 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));
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    {
48      if (rHasLocalOrMixedOrdering(r))
49        gb = sca_mora;
50      else
51        gb = sca_bba; // sca_gr_bba???
52    } else
53    {
54      if (rHasLocalOrMixedOrdering(r))
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:
67ideal twostd(ideal I);
68
69/// Ann: ???
70ideal Approx_Step(ideal L);
71
72#endif // HAVE_PLURAL
73
74#endif // KERNEL_NC_H
Note: See TracBrowser for help on using the repository browser.