1 | #ifndef GRING_H |
---|
2 | #define GRING_H |
---|
3 | /**************************************** |
---|
4 | * Computer Algebra System SINGULAR * |
---|
5 | ****************************************/ |
---|
6 | /* |
---|
7 | * ABSTRACT additional defines etc for --with-plural |
---|
8 | */ |
---|
9 | |
---|
10 | //////////// NOTE: These are left-overs from the original gring.h ///////////////////// |
---|
11 | |
---|
12 | #ifdef HAVE_PLURAL |
---|
13 | |
---|
14 | |
---|
15 | // #include <kernel/structs.h> |
---|
16 | |
---|
17 | // BOOLEAN nc_CheckOrdCondition(matrix D, ring r); |
---|
18 | // BOOLEAN nc_CheckOrdCondition(ring r); // with D == r->GetNC()->D |
---|
19 | |
---|
20 | // BOOLEAN nc_InitMultiplication(ring r); // should call nc_p_ProcsSet! |
---|
21 | // NOTE: instead of constructing nc_struct and calling nc_InitMultiplication yourself - just create C, D and call nc_CallPlural!!! |
---|
22 | |
---|
23 | |
---|
24 | |
---|
25 | |
---|
26 | // used by "rSum" from ring.cc only! |
---|
27 | // purpose init nc structure for initially commutative ring: |
---|
28 | // "creates a commutative nc extension; "converts" comm.ring to a Plural ring" |
---|
29 | ring nc_rCreateNCcomm(ring r); |
---|
30 | |
---|
31 | |
---|
32 | |
---|
33 | |
---|
34 | // poly _gnc_p_Mult_q(poly p, poly q, const int copy, const ring r); |
---|
35 | |
---|
36 | // general multiplication: |
---|
37 | poly _nc_p_Mult_q(poly p, poly q, const ring r); |
---|
38 | poly _nc_pp_Mult_qq(const poly p, const poly q, const ring r); |
---|
39 | |
---|
40 | |
---|
41 | void nc_PolyPolyRed(poly &b, poly p, number *c); |
---|
42 | |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | |
---|
47 | poly p_CopyEmbed(poly p, ring srcRing, int shift, int par_shift); |
---|
48 | |
---|
49 | |
---|
50 | |
---|
51 | // //////////////////////////////////////////////////////////////////////// // |
---|
52 | // NC inlines |
---|
53 | |
---|
54 | // ////////////////////////////////////////////////////// |
---|
55 | |
---|
56 | // returns m*p, does neither destroy p nor m |
---|
57 | inline poly nc_mm_Mult_pp(const poly m, const poly p, const ring r) |
---|
58 | { |
---|
59 | assume(rIsPluralRing(r)); |
---|
60 | assume(r->GetNC()->p_Procs.mm_Mult_pp!=NULL); |
---|
61 | return r->GetNC()->p_Procs.mm_Mult_pp(m, p, r); |
---|
62 | // return pp_Mult_mm( p, m, r); |
---|
63 | } |
---|
64 | |
---|
65 | |
---|
66 | // returns m*p, does destroy p, preserves m |
---|
67 | inline poly nc_mm_Mult_p(const poly m, poly p, const ring r) |
---|
68 | { |
---|
69 | assume(rIsPluralRing(r)); |
---|
70 | assume(r->GetNC()->p_Procs.mm_Mult_p!=NULL); |
---|
71 | return r->GetNC()->p_Procs.mm_Mult_p(m, p, r); |
---|
72 | // return p_Mult_mm( p, m, r); |
---|
73 | } |
---|
74 | |
---|
75 | inline poly nc_CreateSpoly(const poly p1, const poly p2, const ring r) |
---|
76 | { |
---|
77 | assume(rIsPluralRing(r)); |
---|
78 | assume(r->GetNC()->p_Procs.SPoly!=NULL); |
---|
79 | return r->GetNC()->p_Procs.SPoly(p1, p2, r); |
---|
80 | } |
---|
81 | |
---|
82 | inline poly nc_ReduceSpoly(const poly p1, poly p2, const ring r) |
---|
83 | { |
---|
84 | assume(rIsPluralRing(r)); |
---|
85 | assume(r->GetNC()->p_Procs.ReduceSPoly!=NULL); |
---|
86 | #ifdef PDEBUG |
---|
87 | // assume(p_LmDivisibleBy(p1, p2, r)); |
---|
88 | #endif |
---|
89 | return r->GetNC()->p_Procs.ReduceSPoly(p1, p2, r); |
---|
90 | } |
---|
91 | |
---|
92 | /* |
---|
93 | inline void nc_PolyReduce(poly &b, const poly p, number *c, const ring r) // nc_PolyPolyRed |
---|
94 | { |
---|
95 | assume(rIsPluralRing(r)); |
---|
96 | // assume(r->GetNC()->p_Procs.PolyReduce!=NULL); |
---|
97 | // r->GetNC()->p_Procs.PolyReduce(b, p, c, r); |
---|
98 | } |
---|
99 | */ |
---|
100 | |
---|
101 | inline void nc_kBucketPolyRed(kBucket_pt b, poly p, number *c) |
---|
102 | { |
---|
103 | assume(rIsPluralRing(currRing)); |
---|
104 | |
---|
105 | // return gnc_kBucketPolyRedNew(b, p, c); |
---|
106 | |
---|
107 | assume(currRing->GetNC()->p_Procs.BucketPolyRed!=NULL); |
---|
108 | return currRing->GetNC()->p_Procs.BucketPolyRed(b, p, c); |
---|
109 | } |
---|
110 | |
---|
111 | inline void nc_BucketPolyRed_Z(kBucket_pt b, poly p, number *c) |
---|
112 | { |
---|
113 | assume(rIsPluralRing(currRing)); |
---|
114 | |
---|
115 | // return gnc_kBucketPolyRed_ZNew(b, p, c); |
---|
116 | |
---|
117 | assume(currRing->GetNC()->p_Procs.BucketPolyRed_Z!=NULL); |
---|
118 | return currRing->GetNC()->p_Procs.BucketPolyRed_Z(b, p, c); |
---|
119 | |
---|
120 | } |
---|
121 | |
---|
122 | #endif // |
---|