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 "coeffrings.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

#define MYTEST   0

Definition at line 11 of file ncSAMult.cc.

#define OUTPUT   MYTEST

Definition at line 29 of file ncSAMult.cc.

#define PLURAL_INTERNAL_DECLARATIONS

Definition at line 34 of file ncSAMult.cc.

Function Documentation

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

Definition at line 779 of file ncSAMult.cc.

780 {
781 #if OUTPUT
782  Print("AnalyzePair(ring, i: %d, j: %d)!", i, j);
783  PrintLn();
784 #endif
785 
787 
788  if( type == _ncSA_notImplemented ) return NULL;
789 
790 
791  // last possibility:
792  return new CExternalSpecialPairMultiplier(r, i, j, type); // For tests!
793 
794 
795  if( type == _ncSA_1xy0x0y0 )
796  return new CCommutativeSpecialPairMultiplier(r, i, j);
797 
798  if( type == _ncSA_Mxy0x0y0 )
800 
801  if( type == _ncSA_Qxy0x0y0 )
802  {
803  const number q = p_GetCoeff(GetC(r, i, j), r);
804  return new CQuasiCommutativeSpecialPairMultiplier(r, i, j, q);
805  }
806 
807  const poly d = GetD(r, i, j);
808 
809  assume( d != NULL );
810  assume( pNext(d) == NULL );
811 
812  const number g = p_GetCoeff(d, r);
813 
814  if( type == _ncSA_1xy0x0yG ) // Weyl
815  return new CWeylSpecialPairMultiplier(r, i, j, g);
816 
817  if( type == _ncSA_1xyAx0y0 ) // Shift 1
818  return new CShiftSpecialPairMultiplier(r, i, j, i, g);
819 
820  if( type == _ncSA_1xy0xBy0 ) // Shift 2
821  return new CShiftSpecialPairMultiplier(r, i, j, j, g);
822 
823  if( type == _ncSA_1xy0x0yT2 ) // simple homogenized Weyl algebra
824  return new CHWeylSpecialPairMultiplier(r, i, j, p_IsPurePower(d, r));
825 
826 }
void PrintLn()
Definition: reporter.cc:327
#define Print
Definition: emacs.cc:83
g
Definition: cfModGcd.cc:4031
static Enum_ncSAType AnalyzePair(const ring r, int i, int j)
Definition: ncSAFormula.cc:712
const ring r
Definition: syzextra.cc:208
int j
Definition: myNF.cc:70
#define assume(x)
Definition: mod2.h:405
int i
Definition: cfEzgcd.cc:123
int p_IsPurePower(const poly p, const ring r)
return i, if head depends only on var(i)
Definition: p_polys.cc:1224
#define NULL
Definition: omList.c:10
#define pNext(p)
Definition: monomials.h:43
#define p_GetCoeff(p, r)
Definition: monomials.h:57
static poly GetC(const ring r, int i, int j)
Definition: nc.h:397
polyrec * poly
Definition: hilb.h:10
Enum_ncSAType
Definition: ncSAFormula.h:17
static poly GetD(const ring r, int i, int j)
Definition: nc.h:408
BOOLEAN ncInitSpecialPairMultiplication ( ring  r)

Definition at line 267 of file ncSAMult.cc.

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