Loading...
Searching...
No Matches
ncSAFormula.h
Go to the documentation of this file.
#ifndef GRING_SA_MULT_FORMULA_H
#define GRING_SA_MULT_FORMULA_H
/*****************************************
* Computer Algebra System SINGULAR *
*****************************************/
#ifdef HAVE_PLURAL
// //////////////////////////////////////////////////////////////////////// //
#include "polys/monomials/ring.h"
#include "polys/nc/nc.h"
bool ncInitSpecialPowersMultiplication(ring r);
enum Enum_ncSAType
{
_ncSA_notImplemented = -1,
_ncSA_1xy0x0y0 = 0x00, // commutative
_ncSA_Mxy0x0y0 = 0x01, // anti-commutative
_ncSA_Qxy0x0y0 = 0x02, // quasi-commutative
_ncSA_1xyAx0y0 = 0x10, // shift 1
_ncSA_1xy0xBy0 = 0x20, // shift 2
_ncSA_1xy0x0yG = 0x30, // Weyl
_ncSA_1xy0x0yT2 = 0x100 // homogenized Weyl algebra?
};
class CFormulaPowerMultiplier
{
private:
Enum_ncSAType* m_SAPairTypes; // upper triangular submatrix of pairs 1 <= i < j <= N of a N x N matrix.
const int m_NVars;
const ring m_BaseRing;
public:
inline int NVars() const { return m_NVars; }
inline ring GetBasering() const { return m_BaseRing; }
CFormulaPowerMultiplier(ring r);
virtual ~CFormulaPowerMultiplier();
inline Enum_ncSAType GetPair(int i, int j) const
{
assume( m_SAPairTypes != NULL );
assume( i > 0 );
assume( i < j );
assume( j <= NVars() );
return m_SAPairTypes[( (NVars() * ((i)-1) - ((i) * ((i)-1))/2 + (j)-1) - (i) )];
}
inline Enum_ncSAType& GetPair(int i, int j)
{
assume( m_SAPairTypes != NULL );
assume( i > 0 );
assume( i < j );
assume( j <= NVars() );
return m_SAPairTypes[( (NVars() * ((i)-1) - ((i) * ((i)-1))/2 + (j)-1) - (i) )];
}
// Lowest level routines!
static Enum_ncSAType AnalyzePair(const ring r, int i, int j);
static poly Multiply( Enum_ncSAType type, const int i, const int j, const int n, const int m, const ring r);
static poly ncSA_1xy0x0y0(const int i, const int j, const int n, const int m, const ring r);
static poly ncSA_Mxy0x0y0(const int i, const int j, const int n, const int m, const ring r);
static poly ncSA_Qxy0x0y0(const int i, const int j, const int n, const int m, const number m_q, const ring r);
static poly ncSA_1xy0x0yG(const int i, const int j, const int n, const int m, const number m_g, const ring r);
static poly ncSA_1xy0x0yT2(const int i, const int j, const int n, const int m, const int k, const ring r);
static poly ncSA_1xyAx0y0(const int i, const int j, const int n, const int m, const number m_shiftCoef, const ring r);
static poly ncSA_1xy0xBy0(const int i, const int j, const int n, const int m, const number m_shiftCoef, const ring r);
// Higher level abstraction for keeping track of all the pair types!
poly Multiply( int i, int j, const int n, const int m);
private: // no copy constructors!
CFormulaPowerMultiplier();
CFormulaPowerMultiplier(const CFormulaPowerMultiplier&);
CFormulaPowerMultiplier& operator=(const CFormulaPowerMultiplier&);
};
static inline CFormulaPowerMultiplier* GetFormulaPowerMultiplier(const ring r)
{
return r->GetNC()->GetFormulaPowerMultiplier();
}
#endif // HAVE_PLURAL :(
#endif //
m
int m
Definition cfEzgcd.cc:128
i
int i
Definition cfEzgcd.cc:132
k
int k
Definition cfEzgcd.cc:99
CFormulaPowerMultiplier
Definition ncSAFormula.h:28
CFormulaPowerMultiplier::NVars
int NVars() const
Definition ncSAFormula.h:38
CFormulaPowerMultiplier::ncSA_1xy0x0yT2
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
CFormulaPowerMultiplier::m_BaseRing
const ring m_BaseRing
Definition ncSAFormula.h:33
CFormulaPowerMultiplier::~CFormulaPowerMultiplier
virtual ~CFormulaPowerMultiplier()
Definition ncSAFormula.cc:233
CFormulaPowerMultiplier::CFormulaPowerMultiplier
CFormulaPowerMultiplier(ring r)
Definition ncSAFormula.cc:216
CFormulaPowerMultiplier::m_NVars
const int m_NVars
Definition ncSAFormula.h:32
CFormulaPowerMultiplier::ncSA_1xyAx0y0
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
CFormulaPowerMultiplier::AnalyzePair
static Enum_ncSAType AnalyzePair(const ring r, int i, int j)
Definition ncSAFormula.cc:702
CFormulaPowerMultiplier::GetBasering
ring GetBasering() const
Definition ncSAFormula.h:39
CFormulaPowerMultiplier::ncSA_1xy0xBy0
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
CFormulaPowerMultiplier::ncSA_Qxy0x0y0
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
CFormulaPowerMultiplier::ncSA_1xy0x0yG
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
CFormulaPowerMultiplier::m_SAPairTypes
Enum_ncSAType * m_SAPairTypes
Definition ncSAFormula.h:30
CFormulaPowerMultiplier::ncSA_1xy0x0y0
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=
CFormulaPowerMultiplier & operator=(const CFormulaPowerMultiplier &)
CFormulaPowerMultiplier::CFormulaPowerMultiplier
CFormulaPowerMultiplier()
CFormulaPowerMultiplier::GetPair
Enum_ncSAType & GetPair(int i, int j)
Definition ncSAFormula.h:54
CFormulaPowerMultiplier::ncSA_Mxy0x0y0
static poly ncSA_Mxy0x0y0(const int i, const int j, const int n, const int m, const ring r)
Definition ncSAFormula.cc:720
CFormulaPowerMultiplier::GetPair
Enum_ncSAType GetPair(int i, int j) const
Definition ncSAFormula.h:44
CFormulaPowerMultiplier::CFormulaPowerMultiplier
CFormulaPowerMultiplier(const CFormulaPowerMultiplier &)
CFormulaPowerMultiplier::Multiply
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
j
int j
Definition facHensel.cc:110
nc.h
assume
#define assume(x)
Definition mod2.h:389
GetFormulaPowerMultiplier
static CFormulaPowerMultiplier * GetFormulaPowerMultiplier(const ring r)
Definition ncSAFormula.h:93
ncInitSpecialPowersMultiplication
bool ncInitSpecialPowersMultiplication(ring r)
Definition ncSAFormula.cc:50
Enum_ncSAType
Enum_ncSAType
Definition ncSAFormula.h:16
_ncSA_1xy0x0yT2
@ _ncSA_1xy0x0yT2
Definition ncSAFormula.h:24
_ncSA_Mxy0x0y0
@ _ncSA_Mxy0x0y0
Definition ncSAFormula.h:19
_ncSA_1xyAx0y0
@ _ncSA_1xyAx0y0
Definition ncSAFormula.h:21
_ncSA_1xy0x0yG
@ _ncSA_1xy0x0yG
Definition ncSAFormula.h:23
_ncSA_Qxy0x0y0
@ _ncSA_Qxy0x0y0
Definition ncSAFormula.h:20
_ncSA_notImplemented
@ _ncSA_notImplemented
Definition ncSAFormula.h:17
_ncSA_1xy0x0y0
@ _ncSA_1xy0x0y0
Definition ncSAFormula.h:18
_ncSA_1xy0xBy0
@ _ncSA_1xy0xBy0
Definition ncSAFormula.h:22
NULL
#define NULL
Definition omList.c:12
ring.h