Loading...
Searching...
No Matches
ncSAMult.cc File Reference
`#include "misc/auxiliary.h"`
`#include "nc/nc.h"`
`#include "nc/sca.h"`
`#include "misc/options.h"`
`#include "coeffs/numbers.h"`
`#include "monomials/ring.h"`
`#include "monomials/p_polys.h"`
`#include "nc/ncSAMult.h"`

Go to the source code of this file.

## Macros

#define | MYTEST 0
#define | OUTPUT MYTEST
#define | PLURAL_INTERNAL_DECLARATIONS

## Functions

BOOLEAN | ncInitSpecialPairMultiplication (ring r)
CSpecialPairMultiplier * | AnalyzePair (const ring r, int i, int j)

## Macro Definition Documentation

## MYTEST

#define MYTEST 0

Definition at line 11 of file ncSAMult.cc.

## OUTPUT

#define OUTPUT MYTEST

Definition at line 29 of file ncSAMult.cc.

## PLURAL_INTERNAL_DECLARATIONS

#define PLURAL_INTERNAL_DECLARATIONS

Definition at line 34 of file ncSAMult.cc.

## Function Documentation

## AnalyzePair()

CSpecialPairMultiplier * AnalyzePair | ( | const ring | r,
|  | int | i,
|  | int | j )

Definition at line 778 of file ncSAMult.cc.

{
#if OUTPUT
Print("AnalyzePair(ring, i: %d, j: %d)!", i, j);
PrintLn();
#endif
Enum_ncSAType type = CFormulaPowerMultiplier::AnalyzePair(r, i, j);
if( type == _ncSA_notImplemented ) return NULL;
// last possibility:
return new CExternalSpecialPairMultiplier(r, i, j, type); // For tests!
if( type == _ncSA_1xy0x0y0 )
return new CCommutativeSpecialPairMultiplier(r, i, j);
if( type == _ncSA_Mxy0x0y0 )
return new CAntiCommutativeSpecialPairMultiplier(r, i, j);
if( type == _ncSA_Qxy0x0y0 )
{
const number q = p_GetCoeff(GetC(r, i, j), r);
return new CQuasiCommutativeSpecialPairMultiplier(r, i, j, q);
}
const poly d = GetD(r, i, j);
assume( d != NULL );
assume( pNext(d) == NULL );
const number g = p_GetCoeff(d, r);
if( type == _ncSA_1xy0x0yG ) // Weyl
return new CWeylSpecialPairMultiplier(r, i, j, g);
if( type == _ncSA_1xyAx0y0 ) // Shift 1
return new CShiftSpecialPairMultiplier(r, i, j, i, g);
if( type == _ncSA_1xy0xBy0 ) // Shift 2
return new CShiftSpecialPairMultiplier(r, i, j, j, g);
if( type == _ncSA_1xy0x0yT2 ) // simple homogenized Weyl algebra
return new CHWeylSpecialPairMultiplier(r, i, j, p_IsPurePower(d, r));
}
i
int i
Definition cfEzgcd.cc:132
g
g
Definition cfModGcd.cc:4098
CAntiCommutativeSpecialPairMultiplier
Definition ncSAMult.h:512
CCommutativeSpecialPairMultiplier
Definition ncSAMult.h:501
CExternalSpecialPairMultiplier
Definition ncSAMult.h:592
CFormulaPowerMultiplier::AnalyzePair
static Enum_ncSAType AnalyzePair(const ring r, int i, int j)
Definition ncSAFormula.cc:702
CHWeylSpecialPairMultiplier
Definition ncSAMult.h:555
CQuasiCommutativeSpecialPairMultiplier
Definition ncSAMult.h:524
CShiftSpecialPairMultiplier
Definition ncSAMult.h:571
CWeylSpecialPairMultiplier
Definition ncSAMult.h:540
Print
#define Print
Definition emacs.cc:80
j
int j
Definition facHensel.cc:110
GetD
static poly GetD(const ring r, int i, int j)
Definition nc.h:373
GetC
static poly GetC(const ring r, int i, int j)
Definition nc.h:362
assume
#define assume(x)
Definition mod2.h:389
pNext
#define pNext(p)
Definition monomials.h:36
p_GetCoeff
#define p_GetCoeff(p, r)
Definition monomials.h: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
p_IsPurePower
int p_IsPurePower(const poly p, const ring r)
return i, if head depends only on var(i)
Definition p_polys.cc:1227
PrintLn
void PrintLn()
Definition reporter.cc:314

## ncInitSpecialPairMultiplication()

BOOLEAN ncInitSpecialPairMultiplication | ( | ring | r | ) |

Definition at line 266 of file ncSAMult.cc.

{
#if OUTPUT
PrintS("ncInitSpecialPairMultiplication(ring), ring: \n");
rWrite(r, TRUE);
PrintLn();
#endif
if(!rIsPluralRing(r))// ; // :(((
return TRUE;
if(rIsSCA(r))
return TRUE;
if( r->GetNC()->GetGlobalMultiplier() != NULL )
{
WarnS("Already defined!");
return TRUE;
}
r->GetNC()->GetGlobalMultiplier() = new CGlobalMultiplier(r);
ggnc_p_ProcsSet(r, r->p_Procs);
return FALSE; // ok!
}
TRUE
#define TRUE
Definition auxiliary.h:101
FALSE
#define FALSE
Definition auxiliary.h:97
CGlobalMultiplier
Definition ncSAMult.h:264
WarnS
#define WarnS
Definition emacs.cc:78
rIsSCA
static bool rIsSCA(const ring r)
Definition nc.h:190
PrintS
void PrintS(const char *s)
Definition reporter.cc:288
rWrite
void rWrite(ring r, BOOLEAN details)
Definition ring.cc:227
rIsPluralRing
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition ring.h:406