source: git/kernel/nc.h @ 80ca3c

fieker-DuValspielwiese
Last change on this file since 80ca3c was 80ca3c, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
NC-subsystem preparations fix: gnc_GB properly add: gb_hack.h to help handling the circular dependency (GB&NC) chg: moved stuff around and misc changes
  • Property mode set to 100644
File size: 1.6 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 (rHasLocalOrMixedOrdering(r))
47        gb = gnc_gr_mora;
48      else
49        gb = gnc_gr_bba;
50   
51    r->GetNC()->p_Procs.GB = cast_A_to_vptr(gb);
52  }
53
54  return gb(F, Q, w, hilb, strat, r);
55}
56
57/// Compute two-sided GB:
58ideal twostd(ideal I);
59
60/// Ann: ???
61ideal Approx_Step(ideal L);
62
63#endif // HAVE_PLURAL
64
65#endif // KERNEL_NC_H
Note: See TracBrowser for help on using the repository browser.