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 | //////////// NOTE: These are left-overs from the original gring.h ///////////////////// |
---|
12 | |
---|
13 | #ifdef HAVE_PLURAL |
---|
14 | |
---|
15 | |
---|
16 | // #include <kernel/structs.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 | // used by "rSum" from ring.cc only! |
---|
28 | // purpose init nc structure for initially commutative ring: |
---|
29 | // "creates a commutative nc extension; "converts" comm.ring to a Plural ring" |
---|
30 | ring nc_rCreateNCcomm(ring r); |
---|
31 | |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | // poly _gnc_p_Mult_q(poly p, poly q, const int copy, const ring r); |
---|
36 | |
---|
37 | // general multiplication: |
---|
38 | poly _nc_p_Mult_q(poly p, poly q, const ring r); |
---|
39 | poly _nc_pp_Mult_qq(const poly p, const poly q, const ring r); |
---|
40 | |
---|
41 | |
---|
42 | void nc_PolyPolyRed(poly &b, poly p, number *c); |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | poly p_CopyEmbed(poly p, ring srcRing, int shift, int par_shift); |
---|
49 | |
---|
50 | |
---|
51 | |
---|
52 | // //////////////////////////////////////////////////////////////////////// // |
---|
53 | // NC inlines |
---|
54 | |
---|
55 | // ////////////////////////////////////////////////////// |
---|
56 | |
---|
57 | // returns m*p, does neither destroy p nor m |
---|
58 | inline poly nc_mm_Mult_pp(const poly m, const poly p, const ring r) |
---|
59 | { |
---|
60 | assume(rIsPluralRing(r)); |
---|
61 | assume(r->GetNC()->p_Procs.mm_Mult_pp!=NULL); |
---|
62 | return r->GetNC()->p_Procs.mm_Mult_pp(m, p, r); |
---|
63 | // return pp_Mult_mm( p, m, r); |
---|
64 | } |
---|
65 | |
---|
66 | |
---|
67 | // returns m*p, does destroy p, preserves m |
---|
68 | inline poly nc_mm_Mult_p(const poly m, poly p, const ring r) |
---|
69 | { |
---|
70 | assume(rIsPluralRing(r)); |
---|
71 | assume(r->GetNC()->p_Procs.mm_Mult_p!=NULL); |
---|
72 | return r->GetNC()->p_Procs.mm_Mult_p(m, p, r); |
---|
73 | // return p_Mult_mm( p, m, r); |
---|
74 | } |
---|
75 | |
---|
76 | inline poly nc_CreateSpoly(const poly p1, const poly p2, const ring r) |
---|
77 | { |
---|
78 | assume(rIsPluralRing(r)); |
---|
79 | assume(r->GetNC()->p_Procs.SPoly!=NULL); |
---|
80 | return r->GetNC()->p_Procs.SPoly(p1, p2, r); |
---|
81 | } |
---|
82 | |
---|
83 | inline poly nc_ReduceSpoly(const poly p1, poly p2, const ring r) |
---|
84 | { |
---|
85 | assume(rIsPluralRing(r)); |
---|
86 | assume(r->GetNC()->p_Procs.ReduceSPoly!=NULL); |
---|
87 | #ifdef PDEBUG |
---|
88 | // assume(p_LmDivisibleBy(p1, p2, r)); |
---|
89 | #endif |
---|
90 | return r->GetNC()->p_Procs.ReduceSPoly(p1, p2, r); |
---|
91 | } |
---|
92 | |
---|
93 | /* |
---|
94 | inline void nc_PolyReduce(poly &b, const poly p, number *c, const ring r) // nc_PolyPolyRed |
---|
95 | { |
---|
96 | assume(rIsPluralRing(r)); |
---|
97 | // assume(r->GetNC()->p_Procs.PolyReduce!=NULL); |
---|
98 | // r->GetNC()->p_Procs.PolyReduce(b, p, c, r); |
---|
99 | } |
---|
100 | */ |
---|
101 | |
---|
102 | inline void nc_kBucketPolyRed(kBucket_pt b, poly p, number *c) |
---|
103 | { |
---|
104 | assume(rIsPluralRing(currRing)); |
---|
105 | |
---|
106 | // return gnc_kBucketPolyRedNew(b, p, c); |
---|
107 | |
---|
108 | assume(currRing->GetNC()->p_Procs.BucketPolyRed!=NULL); |
---|
109 | return currRing->GetNC()->p_Procs.BucketPolyRed(b, p, c); |
---|
110 | } |
---|
111 | |
---|
112 | inline void nc_BucketPolyRed_Z(kBucket_pt b, poly p, number *c) |
---|
113 | { |
---|
114 | assume(rIsPluralRing(currRing)); |
---|
115 | |
---|
116 | // return gnc_kBucketPolyRed_ZNew(b, p, c); |
---|
117 | |
---|
118 | assume(currRing->GetNC()->p_Procs.BucketPolyRed_Z!=NULL); |
---|
119 | return currRing->GetNC()->p_Procs.BucketPolyRed_Z(b, p, c); |
---|
120 | |
---|
121 | } |
---|
122 | |
---|
123 | inline ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat) |
---|
124 | { |
---|
125 | assume(rIsPluralRing(currRing)); |
---|
126 | |
---|
127 | assume(currRing->GetNC()->p_Procs.GB!=NULL); |
---|
128 | return currRing->GetNC()->p_Procs.GB(F, Q, w, hilb, strat); |
---|
129 | |
---|
130 | /* |
---|
131 | if (rHasLocalOrMixedOrder(currRing)) |
---|
132 | { |
---|
133 | assume(currRing->GetNC()->p_Procs.LocalGB!=NULL); |
---|
134 | return currRing->GetNC()->p_Procs.LocalGB(F, Q, w, hilb, strat); |
---|
135 | } else |
---|
136 | { |
---|
137 | assume(currRing->GetNC()->p_Procs.GlobalGB!=NULL); |
---|
138 | return currRing->GetNC()->p_Procs.GlobalGB(F, Q, w, hilb, strat); |
---|
139 | } |
---|
140 | */ |
---|
141 | } |
---|
142 | |
---|
143 | |
---|
144 | |
---|
145 | |
---|
146 | #endif // |
---|