My Project
Loading...
Searching...
No Matches
Macros | Functions
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)
 
CSpecialPairMultiplierAnalyzePair (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.

779{
780#if OUTPUT
781 Print("AnalyzePair(ring, i: %d, j: %d)!", i, j);
782 PrintLn();
783#endif
784
786
787 if( type == _ncSA_notImplemented ) return NULL;
788
789
790 // last possibility:
791 return new CExternalSpecialPairMultiplier(r, i, j, type); // For tests!
792
793
794 if( type == _ncSA_1xy0x0y0 )
795 return new CCommutativeSpecialPairMultiplier(r, i, j);
796
797 if( type == _ncSA_Mxy0x0y0 )
799
800 if( type == _ncSA_Qxy0x0y0 )
801 {
802 const number q = p_GetCoeff(GetC(r, i, j), r);
803 return new CQuasiCommutativeSpecialPairMultiplier(r, i, j, q);
804 }
805
806 const poly d = GetD(r, i, j);
807
808 assume( d != NULL );
809 assume( pNext(d) == NULL );
810
811 const number g = p_GetCoeff(d, r);
812
813 if( type == _ncSA_1xy0x0yG ) // Weyl
814 return new CWeylSpecialPairMultiplier(r, i, j, g);
815
816 if( type == _ncSA_1xyAx0y0 ) // Shift 1
817 return new CShiftSpecialPairMultiplier(r, i, j, i, g);
818
819 if( type == _ncSA_1xy0xBy0 ) // Shift 2
820 return new CShiftSpecialPairMultiplier(r, i, j, j, g);
821
822 if( type == _ncSA_1xy0x0yT2 ) // simple homogenized Weyl algebra
823 return new CHWeylSpecialPairMultiplier(r, i, j, p_IsPurePower(d, r));
824
825}
int i
Definition: cfEzgcd.cc:132
g
Definition: cfModGcd.cc:4090
static Enum_ncSAType AnalyzePair(const ring r, int i, int j)
Definition: ncSAFormula.cc:702
#define Print
Definition: emacs.cc:80
int j
Definition: facHensel.cc:110
static poly GetD(const ring r, int i, int j)
Definition: nc.h:373
static poly GetC(const ring r, int i, int j)
Definition: nc.h:362
#define assume(x)
Definition: mod2.h:389
#define pNext(p)
Definition: monomials.h:36
#define p_GetCoeff(p, r)
Definition: monomials.h: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
int p_IsPurePower(const poly p, const ring r)
return i, if head depends only on var(i)
Definition: p_polys.cc:1226
void PrintLn()
Definition: reporter.cc:310

◆ ncInitSpecialPairMultiplication()

BOOLEAN ncInitSpecialPairMultiplication ( ring  r)

Definition at line 266 of file ncSAMult.cc.

267{
268#if OUTPUT
269 PrintS("ncInitSpecialPairMultiplication(ring), ring: \n");
270 rWrite(r, TRUE);
271 PrintLn();
272#endif
273
274 if(!rIsPluralRing(r))// ; // :(((
275 return TRUE;
276
277 if(rIsSCA(r))
278 return TRUE;
279
280 if( r->GetNC()->GetGlobalMultiplier() != NULL )
281 {
282 WarnS("Already defined!");
283 return TRUE;
284 }
285
286 r->GetNC()->GetGlobalMultiplier() = new CGlobalMultiplier(r);
287
288 ggnc_p_ProcsSet(r, r->p_Procs);
289 return FALSE; // ok!
290}
#define TRUE
Definition: auxiliary.h:100
#define FALSE
Definition: auxiliary.h:96
#define WarnS
Definition: emacs.cc:78
static bool rIsSCA(const ring r)
Definition: nc.h:190
void PrintS(const char *s)
Definition: reporter.cc:284
void rWrite(ring r, BOOLEAN details)
Definition: ring.cc:226
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:400