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

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