My Project
Loading...
Searching...
No Matches
ncSAFormula.h
Go to the documentation of this file.
1#ifndef GRING_SA_MULT_FORMULA_H
2#define GRING_SA_MULT_FORMULA_H
3/*****************************************
4 * Computer Algebra System SINGULAR *
5 *****************************************/
6#ifdef HAVE_PLURAL
7
8// //////////////////////////////////////////////////////////////////////// //
9
11#include "polys/nc/nc.h"
12
14
16{
18 _ncSA_1xy0x0y0 = 0x00, // commutative
19 _ncSA_Mxy0x0y0 = 0x01, // anti-commutative
20 _ncSA_Qxy0x0y0 = 0x02, // quasi-commutative
21 _ncSA_1xyAx0y0 = 0x10, // shift 1
22 _ncSA_1xy0xBy0 = 0x20, // shift 2
23 _ncSA_1xy0x0yG = 0x30, // Weyl
24 _ncSA_1xy0x0yT2 = 0x100 // homogenized Weyl algebra?
25};
26
28{
29 private:
30 Enum_ncSAType* m_SAPairTypes; // upper triangular submatrix of pairs 1 <= i < j <= N of a N x N matrix.
31
32 const int m_NVars;
33 const ring m_BaseRing;
34
35
36
37 public:
38 inline int NVars() const { return m_NVars; }
39 inline ring GetBasering() const { return m_BaseRing; }
40
43
44 inline Enum_ncSAType GetPair(int i, int j) const
45 {
47 assume( i > 0 );
48 assume( i < j );
49 assume( j <= NVars() );
50
51 return m_SAPairTypes[( (NVars() * ((i)-1) - ((i) * ((i)-1))/2 + (j)-1) - (i) )];
52 }
53
54 inline Enum_ncSAType& GetPair(int i, int j)
55 {
57 assume( i > 0 );
58 assume( i < j );
59 assume( j <= NVars() );
60
61 return m_SAPairTypes[( (NVars() * ((i)-1) - ((i) * ((i)-1))/2 + (j)-1) - (i) )];
62 }
63
64 // Lowest level routines!
65 static Enum_ncSAType AnalyzePair(const ring r, int i, int j);
66 static poly Multiply( Enum_ncSAType type, const int i, const int j, const int n, const int m, const ring r);
67
68 static poly ncSA_1xy0x0y0(const int i, const int j, const int n, const int m, const ring r);
69 static poly ncSA_Mxy0x0y0(const int i, const int j, const int n, const int m, const ring r);
70
71 static poly ncSA_Qxy0x0y0(const int i, const int j, const int n, const int m, const number m_q, const ring r);
72
73 static poly ncSA_1xy0x0yG(const int i, const int j, const int n, const int m, const number m_g, const ring r);
74 static poly ncSA_1xy0x0yT2(const int i, const int j, const int n, const int m, const int k, const ring r);
75
76 static poly ncSA_1xyAx0y0(const int i, const int j, const int n, const int m, const number m_shiftCoef, const ring r);
77 static poly ncSA_1xy0xBy0(const int i, const int j, const int n, const int m, const number m_shiftCoef, const ring r);
78
79
80
81 // Higher level abstraction for keeping track of all the pair types!
82 poly Multiply( int i, int j, const int n, const int m);
83
84 private: // no copy constuctors!
88
89
90};
91
92
94{
95 return r->GetNC()->GetFormulaPowerMultiplier();
96}
97
98
99
100
101#endif // HAVE_PLURAL :(
102#endif //
int m
Definition: cfEzgcd.cc:128
int i
Definition: cfEzgcd.cc:132
int k
Definition: cfEzgcd.cc:99
static poly ncSA_1xy0x0yT2(const int i, const int j, const int n, const int m, const int k, const ring r)
Definition: ncSAFormula.cc:735
virtual ~CFormulaPowerMultiplier()
Definition: ncSAFormula.cc:233
static poly ncSA_1xyAx0y0(const int i, const int j, const int n, const int m, const number m_shiftCoef, const ring r)
Definition: ncSAFormula.cc:740
static Enum_ncSAType AnalyzePair(const ring r, int i, int j)
Definition: ncSAFormula.cc:702
ring GetBasering() const
Definition: ncSAFormula.h:39
static poly ncSA_1xy0xBy0(const int i, const int j, const int n, const int m, const number m_shiftCoef, const ring r)
Definition: ncSAFormula.cc:745
static poly ncSA_Qxy0x0y0(const int i, const int j, const int n, const int m, const number m_q, const ring r)
Definition: ncSAFormula.cc:725
static poly ncSA_1xy0x0yG(const int i, const int j, const int n, const int m, const number m_g, const ring r)
Definition: ncSAFormula.cc:730
Enum_ncSAType * m_SAPairTypes
Definition: ncSAFormula.h:30
static poly ncSA_1xy0x0y0(const int i, const int j, const int n, const int m, const ring r)
Definition: ncSAFormula.cc:715
CFormulaPowerMultiplier & operator=(const CFormulaPowerMultiplier &)
Enum_ncSAType & GetPair(int i, int j)
Definition: ncSAFormula.h:54
static poly ncSA_Mxy0x0y0(const int i, const int j, const int n, const int m, const ring r)
Definition: ncSAFormula.cc:720
Enum_ncSAType GetPair(int i, int j) const
Definition: ncSAFormula.h:44
CFormulaPowerMultiplier(const CFormulaPowerMultiplier &)
static poly Multiply(Enum_ncSAType type, const int i, const int j, const int n, const int m, const ring r)
Definition: ncSAFormula.cc:696
int j
Definition: facHensel.cc:110
#define assume(x)
Definition: mod2.h:389
static CFormulaPowerMultiplier * GetFormulaPowerMultiplier(const ring r)
Definition: ncSAFormula.h:93
bool ncInitSpecialPowersMultiplication(ring r)
Definition: ncSAFormula.cc:50
Enum_ncSAType
Definition: ncSAFormula.h:16
@ _ncSA_1xy0x0yT2
Definition: ncSAFormula.h:24
@ _ncSA_Mxy0x0y0
Definition: ncSAFormula.h:19
@ _ncSA_1xyAx0y0
Definition: ncSAFormula.h:21
@ _ncSA_1xy0x0yG
Definition: ncSAFormula.h:23
@ _ncSA_Qxy0x0y0
Definition: ncSAFormula.h:20
@ _ncSA_notImplemented
Definition: ncSAFormula.h:17
@ _ncSA_1xy0x0y0
Definition: ncSAFormula.h:18
@ _ncSA_1xy0xBy0
Definition: ncSAFormula.h:22
#define NULL
Definition: omList.c:12