source: git/kernel/GBEngine/nc.h @ 52e6ef

spielwiese
Last change on this file since 52e6ef was 52e6ef, checked in by Hans Schoenemann <hannes@…>, 8 years ago
chg: use misc/auxiliary.h in libpolys and kernel/mod2.h in Singular for config
  • Property mode set to 100644
File size: 1.7 KB
Line 
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{
29  assume(rIsPluralRing(r));
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    {
47      if (rHasLocalOrMixedOrdering(r))
48        gb = sca_mora;
49      else
50        gb = sca_bba; // sca_gr_bba???
51    } else
52    {
53      if (rHasLocalOrMixedOrdering(r))
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
Note: See TracBrowser for help on using the repository browser.