27 #define PLURAL_INTERNAL_DECLARATIONS 53 PrintS(
"ncInitSpecialPowersMultiplication(ring), ring: \n");
62 if( r->GetNC()->GetFormulaPowerMultiplier() !=
NULL )
64 WarnS(
"Already defined!");
85 Print(
"AreCommutingVariables(ring, k: %d, i: %d)!\n",
j,
i);
104 const poly d =
GetD(r,
i,
j);
136 Print(
"AnalyzePair(ring, i: %d, j: %d):\n",
i,
j);
146 const poly c =
GetC(r,
i,
j);
148 const poly d =
GetD(r,
i,
j);
190 }
else if (
exp == 2 &&
k!=
i &&
k !=
j)
209 PrintS(
"====>>>>_ncSA_notImplemented\n");
219 PrintS(
"CFormulaPowerMultiplier::CFormulaPowerMultiplier(ring)!");
236 PrintS(
"CFormulaPowerMultiplier::~CFormulaPowerMultiplier()!");
259 static inline poly
ncSA_1xy0x0y0(
const int i,
const int j,
const int n,
const int m,
const ring r)
262 Print(
"ncSA_1xy0x0y0(var(%d)^{%d}, var(%d)^{%d}, r)!\n",
j,
m,
i, n);
276 static inline poly
ncSA_Mxy0x0y0(
const int i,
const int j,
const int n,
const int m,
const ring r)
279 Print(
"ncSA_{M = -1}xy0x0y0(var(%d)^{%d}, var(%d)^{%d}, r)!\n",
j,
m,
i, n);
282 const int sign = 1 - ((n & (
m & 1)) << 1);
295 static inline poly
ncSA_Qxy0x0y0(
const int i,
const int j,
const int n,
const int m,
const number m_q,
const ring r)
298 Print(
"ncSA_Qxy0x0y0(var(%d)^{%d}, var(%d)^{%d}, Q, r)!\n",
j,
m,
i, n);
344 static inline poly
ncSA_1xy0x0yG(
const int i,
const int j,
const int n,
const int m,
const number m_g,
const ring r)
347 Print(
"ncSA_1xy0x0yG(var(%d)^{%d}, var(%d)^{%d}, G, r)!\n",
j,
m,
i, n);
348 number t =
n_Copy(m_g, r->cf);
356 number c =
n_Init(1, r->cf);
375 number t =
n_Init(km + 1, r->cf);
380 t =
n_Init(kn + 1, r->cf);
385 c =
n_Div(c, t, r->cf);
404 assume((km == 0) || (kn == 0) );
411 number t =
n_Init(km + 1, r->cf);
418 number t =
n_Init(kn + 1, r->cf);
424 c =
n_Div(c, t, r->cf);
443 static inline poly
ncSA_1xy0x0yT2(
const int i,
const int j,
const int n,
const int m,
const int m_k,
const ring r)
446 Print(
"ncSA_1xy0x0yT2(var(%d)^{%d}, var(%d)^{%d}, t: var(%d), r)!\n",
j,
m,
i, n, m_k);
453 number c =
n_Init(1, r->cf);
473 number t =
n_Init(km + 1, r->cf);
478 t =
n_Init(kn + 1, r->cf);
483 c =
n_Div(c, t, r->cf);
504 assume((km == 0) || (kn == 0) );
511 number t =
n_Init(km + 1, r->cf);
518 number t =
n_Init(kn + 1, r->cf);
524 c =
n_Div(c, t, r->cf);
548 static inline poly
ncSA_ShiftAx(
int i,
int j,
int n,
int m,
const number m_shiftCoef,
const ring r)
554 number c =
n_Init(1, r->cf);
566 number nn =
n_Init(n, r->cf);
575 number t =
n_Init(
k + 1, r->cf);
581 c =
n_Div(c, t, r->cf);
605 c =
n_Div(c, t, r->cf);
625 static inline poly
ncSA_1xyAx0y0(
const int i,
const int j,
const int n,
const int m,
const number m_shiftCoef,
const ring r)
628 Print(
"ncSA_1xyAx0y0(var(%d)^{%d}, var(%d)^{%d}, A, r)!\n",
j,
m,
i, n);
629 number t =
n_Copy(m_shiftCoef, r);
637 static inline poly
ncSA_1xy0xBy0(
const int i,
const int j,
const int n,
const int m,
const number m_shiftCoef,
const ring r)
640 Print(
"ncSA_1xy0xBy0(var(%d)^{%d}, var(%d)^{%d}, B, r)!\n",
j,
m,
i, n);
641 number t =
n_Copy(m_shiftCoef, r);
657 Print(
"ncSA_Multiply(type: %d, ring, (var(%d)^{%d} * var(%d)^{%d}, r)!\n", (
int)type,
j,
m,
i, n);
675 const poly d =
GetD(r,
i,
j);
static poly pLast(poly a, int &length)
returns the length of a polynomial (numbers of monomials) respect syzComp
static BOOLEAN p_LmIsConstantComp(const poly p, const ring r)
gmp_float exp(const gmp_float &a)
static int min(int a, int b)
static int si_min(const int a, const int b)
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of 'a' and 'b'; replacement of 'a' by the product a*b
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
#define omFreeSize(addr, size)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
const CanonicalForm CFMap CFMap & N
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static int max(int a, int b)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
static int p_LmCmp(poly p, poly q, const ring r)
void PrintS(const char *s)
void rWrite(ring r, BOOLEAN details)
static poly pReverse(poly p)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
int p_IsPurePower(const poly p, const ring r)
return i, if head depends only on var(i)
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
static bool rIsSCA(const ring r)
static void p_Setm(poly p, const ring r)
static poly GetC(const ring r, int i, int j)
CanonicalForm reverse(const CanonicalForm &F, int d)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE BOOLEAN n_IsMOne(number n, const coeffs r)
TRUE iff 'n' represents the additive inverse of the one element, i.e. -1.
void p_Write(poly p, ring lmRing, ring tailRing)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
static poly GetD(const ring r, int i, int j)