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

spielwiese
Last change on this file since 76fead was 210e07, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: testing headers with "make test.o" FIX: cleaning up headers in kernel: TODO: kutil.h?! FIX: febase.h -> old.febase.h (remove later on) ADD: dummy headers instead of some splited or moved: febase.h, modulop.h (for later fixing) FIX: renamed various obsolette files into "old.*"
  • Property mode set to 100644
File size: 4.2 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
48poly nc_CreateShortSpoly(poly p1, poly p2, const ring r=currRing);
49
50
51/* brackets: p will be destroyed... */
52poly nc_p_Bracket_qq(poly p, const poly q);
53
54/* twostd: */
55ideal twostd(ideal I);
56/* Ann: */
57ideal Approx_Step(ideal L);
58
59/* complete reduction routines */
60
61matrix nc_PrintMat(int a, int b, ring r, int metric);
62
63poly p_CopyEmbed(poly p, ring srcRing, int shift, int par_shift);
64
65
66
67// //////////////////////////////////////////////////////////////////////// //
68// NC inlines
69
70// //////////////////////////////////////////////////////
71
72// returns m*p, does neither destroy p nor m
73inline poly nc_mm_Mult_pp(const poly m, const poly p, const ring r)
74{
75  assume(rIsPluralRing(r));
76  assume(r->GetNC()->p_Procs.mm_Mult_pp!=NULL);
77  return r->GetNC()->p_Procs.mm_Mult_pp(m, p, r);
78//  return pp_Mult_mm( p, m, r);
79}
80
81
82// returns m*p, does destroy p, preserves m
83inline poly nc_mm_Mult_p(const poly m, poly p, const ring r)
84{
85  assume(rIsPluralRing(r));
86  assume(r->GetNC()->p_Procs.mm_Mult_p!=NULL);
87  return r->GetNC()->p_Procs.mm_Mult_p(m, p, r);
88//   return p_Mult_mm( p, m, r);
89}
90
91inline poly nc_CreateSpoly(const poly p1, const poly p2, const ring r)
92{
93  assume(rIsPluralRing(r));
94  assume(r->GetNC()->p_Procs.SPoly!=NULL);
95  return r->GetNC()->p_Procs.SPoly(p1, p2, r);
96}
97
98inline poly nc_ReduceSpoly(const poly p1, poly p2, const ring r)
99{
100  assume(rIsPluralRing(r));
101  assume(r->GetNC()->p_Procs.ReduceSPoly!=NULL);
102#ifdef PDEBUG
103//  assume(p_LmDivisibleBy(p1, p2, r));
104#endif
105  return r->GetNC()->p_Procs.ReduceSPoly(p1, p2, r);
106}
107
108/*
109inline void nc_PolyReduce(poly &b, const poly p, number *c, const ring r) // nc_PolyPolyRed
110{
111  assume(rIsPluralRing(r));
112//  assume(r->GetNC()->p_Procs.PolyReduce!=NULL);
113//  r->GetNC()->p_Procs.PolyReduce(b, p, c, r);
114}
115*/
116
117inline void nc_kBucketPolyRed(kBucket_pt b, poly p, number *c)
118{
119  assume(rIsPluralRing(currRing));
120
121//   return gnc_kBucketPolyRedNew(b, p, c);
122
123  assume(currRing->GetNC()->p_Procs.BucketPolyRed!=NULL);
124  return currRing->GetNC()->p_Procs.BucketPolyRed(b, p, c);
125}
126
127inline void nc_BucketPolyRed_Z(kBucket_pt b, poly p, number *c)
128{
129  assume(rIsPluralRing(currRing));
130
131//   return gnc_kBucketPolyRed_ZNew(b, p, c);
132
133  assume(currRing->GetNC()->p_Procs.BucketPolyRed_Z!=NULL);
134  return currRing->GetNC()->p_Procs.BucketPolyRed_Z(b, p, c);
135
136}
137
138inline ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat)
139{
140  assume(rIsPluralRing(currRing));
141
142  assume(currRing->GetNC()->p_Procs.GB!=NULL);
143  return currRing->GetNC()->p_Procs.GB(F, Q, w, hilb, strat);
144
145/*
146  if (rHasLocalOrMixedOrder(currRing))
147  {
148    assume(currRing->GetNC()->p_Procs.LocalGB!=NULL);
149    return currRing->GetNC()->p_Procs.LocalGB(F, Q, w, hilb, strat);
150  } else
151  {
152    assume(currRing->GetNC()->p_Procs.GlobalGB!=NULL);
153    return currRing->GetNC()->p_Procs.GlobalGB(F, Q, w, hilb, strat);
154  }
155*/
156}
157
158
159
160
161#ifdef PLURAL_INTERNAL_DECLARATIONS
162
163// we need nc_gr_initBba for sca_gr_bba and gr_bba.
164void nc_gr_initBba(ideal F,kStrategy strat); 
165#endif // PLURAL_INTERNAL_DECLARATIONS
166
167#endif // HAVE_PLURAL :(
168#endif //
Note: See TracBrowser for help on using the repository browser.