source: git/libpolys/polys/nc/old.gring.h @ c6c3f1

spielwiese
Last change on this file since c6c3f1 was c6c3f1, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: export nc_CheckSubalgebra
  • Property mode set to 100644
File size: 4.0 KB
Line 
1#ifndef GRING_H
2#define GRING_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id$ */
7/*
8* ABSTRACT additional defines etc for --with-plural
9*/
10
11#ifdef HAVE_PLURAL
12
13
14#include <kernel/structs.h>
15#include <kernel/ring.h>
16#include <kernel/matpol.h>
17
18// BOOLEAN nc_CheckOrdCondition(matrix D, ring r);
19// BOOLEAN nc_CheckOrdCondition(ring r); // with D == r->GetNC()->D
20
21// BOOLEAN nc_InitMultiplication(ring r); // should call nc_p_ProcsSet!
22// NOTE: instead of constructing nc_struct and calling nc_InitMultiplication yourself - just create C, D and call nc_CallPlural!!!
23
24
25
26
27
28
29// used by "rSum" from ring.cc only!
30// purpose init nc structure for initially commutative ring:
31// "creates a commutative nc extension; "converts" comm.ring to a Plural ring"
32ring nc_rCreateNCcomm(ring r); 
33
34
35// poly _gnc_p_Mult_q(poly p, poly q, const int copy, const ring r);
36
37// general multiplication:
38poly _nc_p_Mult_q(poly p, poly q, const ring r);
39poly _nc_pp_Mult_qq(const poly p, const poly q, const ring r);
40
41
42void nc_PolyPolyRed(poly &b, poly p, number *c);
43
44
45
46
47/* twostd: */
48ideal twostd(ideal I);
49/* Ann: */
50ideal Approx_Step(ideal L);
51
52/* complete reduction routines */
53
54matrix nc_PrintMat(int a, int b, ring r, int metric);
55
56poly p_CopyEmbed(poly p, ring srcRing, int shift, int par_shift);
57
58
59
60// //////////////////////////////////////////////////////////////////////// //
61// NC inlines
62
63// //////////////////////////////////////////////////////
64
65// returns m*p, does neither destroy p nor m
66inline poly nc_mm_Mult_pp(const poly m, const poly p, const ring r)
67{
68  assume(rIsPluralRing(r));
69  assume(r->GetNC()->p_Procs.mm_Mult_pp!=NULL);
70  return r->GetNC()->p_Procs.mm_Mult_pp(m, p, r);
71//  return pp_Mult_mm( p, m, r);
72}
73
74
75// returns m*p, does destroy p, preserves m
76inline poly nc_mm_Mult_p(const poly m, poly p, const ring r)
77{
78  assume(rIsPluralRing(r));
79  assume(r->GetNC()->p_Procs.mm_Mult_p!=NULL);
80  return r->GetNC()->p_Procs.mm_Mult_p(m, p, r);
81//   return p_Mult_mm( p, m, r);
82}
83
84inline poly nc_CreateSpoly(const poly p1, const poly p2, const ring r)
85{
86  assume(rIsPluralRing(r));
87  assume(r->GetNC()->p_Procs.SPoly!=NULL);
88  return r->GetNC()->p_Procs.SPoly(p1, p2, r);
89}
90
91inline poly nc_ReduceSpoly(const poly p1, poly p2, const ring r)
92{
93  assume(rIsPluralRing(r));
94  assume(r->GetNC()->p_Procs.ReduceSPoly!=NULL);
95#ifdef PDEBUG
96//  assume(p_LmDivisibleBy(p1, p2, r));
97#endif
98  return r->GetNC()->p_Procs.ReduceSPoly(p1, p2, r);
99}
100
101/*
102inline void nc_PolyReduce(poly &b, const poly p, number *c, const ring r) // nc_PolyPolyRed
103{
104  assume(rIsPluralRing(r));
105//  assume(r->GetNC()->p_Procs.PolyReduce!=NULL);
106//  r->GetNC()->p_Procs.PolyReduce(b, p, c, r);
107}
108*/
109
110inline void nc_kBucketPolyRed(kBucket_pt b, poly p, number *c)
111{
112  assume(rIsPluralRing(currRing));
113
114//   return gnc_kBucketPolyRedNew(b, p, c);
115
116  assume(currRing->GetNC()->p_Procs.BucketPolyRed!=NULL);
117  return currRing->GetNC()->p_Procs.BucketPolyRed(b, p, c);
118}
119
120inline void nc_BucketPolyRed_Z(kBucket_pt b, poly p, number *c)
121{
122  assume(rIsPluralRing(currRing));
123
124//   return gnc_kBucketPolyRed_ZNew(b, p, c);
125
126  assume(currRing->GetNC()->p_Procs.BucketPolyRed_Z!=NULL);
127  return currRing->GetNC()->p_Procs.BucketPolyRed_Z(b, p, c);
128
129}
130
131inline ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat)
132{
133  assume(rIsPluralRing(currRing));
134
135  assume(currRing->GetNC()->p_Procs.GB!=NULL);
136  return currRing->GetNC()->p_Procs.GB(F, Q, w, hilb, strat);
137
138/*
139  if (rHasLocalOrMixedOrder(currRing))
140  {
141    assume(currRing->GetNC()->p_Procs.LocalGB!=NULL);
142    return currRing->GetNC()->p_Procs.LocalGB(F, Q, w, hilb, strat);
143  } else
144  {
145    assume(currRing->GetNC()->p_Procs.GlobalGB!=NULL);
146    return currRing->GetNC()->p_Procs.GlobalGB(F, Q, w, hilb, strat);
147  }
148*/
149}
150
151
152
153
154#ifdef PLURAL_INTERNAL_DECLARATIONS
155
156// we need nc_gr_initBba for sca_gr_bba and gr_bba.
157void nc_gr_initBba(ideal F,kStrategy strat); 
158#endif // PLURAL_INTERNAL_DECLARATIONS
159
160#endif // HAVE_PLURAL :(
161#endif //
Note: See TracBrowser for help on using the repository browser.