 |
My Project
debian-1:4.1.2-p1+ds-2
|
Go to the source code of this file.
|
#define | pLPunshift(p, sh) p_LPunshift(p, currRing) |
|
#define | pmLPunshift(p, sh) p_mLPunshift(p, currRing) |
|
#define | pLPshift(p, sh) p_LPshift(p, sh, currRing) |
|
#define | pmLPshift(p, sh) p_mLPshift(p, sh, currRing) |
|
#define | pLastVblock(p) p_LastVblock(p,currRing) |
|
#define | pmLastVblock(p) p_mLastVblock(p,currRing) |
|
#define | pFirstVblock(p) p_FirstVblock(p,currRing) |
|
#define | pmFirstVblock(p) p_mFirstVblock(p,currRing) |
|
#define | kSplitFrame(m1, m2, at) k_SplitFrame(m1, m2, at, currRing); |
|
#define | idIsInV(I) id_IsInV(I, currRing) |
|
#define | pIsInV(p) p_IsInV(p, currRing) |
|
#define | pmIsInV(p) p_mIsInV(p, currRing) |
|
|
poly | shift_pp_Mult_mm (poly p, const poly m, const ring r) |
|
poly | shift_p_Mult_mm (poly p, const poly m, const ring r) |
|
poly | shift_pp_mm_Mult (poly p, const poly m, const ring r) |
|
poly | shift_p_mm_Mult (poly p, const poly m, const ring r) |
|
poly | shift_p_Minus_mm_Mult_qq (poly p, poly m, poly q, int &Shorter, const poly spNoether, const ring r) |
|
poly | shift_pp_Mult_mm_Noether_STUB (poly p, const poly m, const poly spNoether, int &ll, const ring ri) |
|
poly | shift_pp_Mult_Coeff_mm_DivSelectMult_STUB (poly p, const poly m, const poly a, const poly b, int &shorter, const ring r) |
|
poly | shift_pp_Mult_Coeff_mm_DivSelect_STUB (poly p, const poly m, int &shorter, const ring r) |
|
void | p_mLPunshift (poly m, const ring ri) |
|
void | p_LPunshift (poly p, const ring ri) |
|
void | p_mLPshift (poly p, int sh, const ring r) |
|
void | p_LPshift (poly p, int sh, const ring r) |
|
int | p_LastVblock (poly p, const ring r) |
|
int | p_mLastVblock (poly p, const ring r) |
|
int | p_mLastVblock (poly p, int *expV, const ring r) |
|
int | p_FirstVblock (poly p, const ring r) |
|
int | p_mFirstVblock (poly p, const ring r) |
|
int | p_mFirstVblock (poly p, int *expV, const ring r) |
|
void | p_LPExpVappend (int *m1ExpV, int *m2ExpV, int m1Length, int m2Length, const ring ri) |
|
void | p_LPExpVprepend (int *m1ExpV, int *m2ExpV, int m1Length, int m2Length, const ring ri) |
|
void | WriteLPExpV (int *expV, ring ri) |
|
char * | LPExpVString (int *expV, ring ri) |
|
void | k_SplitFrame (poly &m1, poly &m2, int at, const ring r) |
|
int | id_IsInV (ideal I, const ring r) |
|
int | p_IsInV (poly p, const ring r) |
|
int | p_mIsInV (poly p, const ring r) |
|
BOOLEAN | p_LPDivisibleBy (poly a, poly b, const ring r) |
|
BOOLEAN | p_LPLmDivisibleBy (poly a, poly b, const ring r) |
|
BOOLEAN | _p_LPLmDivisibleByNoComp (poly a, poly b, const ring r) |
|
poly | p_LPVarAt (poly p, int pos, const ring r) |
|
ring | freeAlgebra (ring r, int d) |
| create the letterplace ring corresponding to r up to degree d More...
|
|
◆ idIsInV
◆ kSplitFrame
◆ pFirstVblock
◆ pIsInV
◆ pLastVblock
◆ pLPshift
◆ pLPunshift
◆ pmFirstVblock
◆ pmIsInV
◆ pmLastVblock
◆ pmLPshift
◆ pmLPunshift
◆ _p_LPLmDivisibleByNoComp()
BOOLEAN _p_LPLmDivisibleByNoComp |
( |
poly |
a, |
|
|
poly |
b, |
|
|
const ring |
r |
|
) |
| |
Definition at line 716 of file shiftop.cc.
720 #ifdef SHIFT_MULT_COMPAT_MODE
728 int j = r->N - (
i * r->isLPring);
729 bool divisible =
true;
740 if (divisible)
return TRUE;
744 #ifdef SHIFT_MULT_COMPAT_MODE
◆ freeAlgebra()
ring freeAlgebra |
( |
ring |
r, |
|
|
int |
d |
|
) |
| |
create the letterplace ring corresponding to r up to degree d
Definition at line 783 of file shiftop.cc.
801 WerrorS(
"weights must be positive");
817 WerrorS(
"weights must be positive");
826 WerrorS(
"ordering (a(..),lp/rp not implemented for Letterplace rings");
829 int ** wvhdl=(
int**)
omAlloc0((r->N+3)*
sizeof(
int*));
831 int* blk0=(
int*)
omAlloc0((r->N+3)*
sizeof(int));
832 int* blk1=(
int*)
omAlloc0((r->N+3)*
sizeof(int));
837 for(
int i=0;
i<r->N;
i++)
848 wvhdl[
i+
p][
j*r->N+
i]=1;
850 wvhdl[
i+
p][(
j+1)*r->N-
i-1]=1;
853 ord[r->N+
p]=r->order[
p];
858 if (
p==1) ord[0]=r->order[0];
859 else if (
p==0) ord[r->N+1]=r->order[1];
862 WerrorS(
"ordering not implemented for Letterplace rings");
869 default:
WerrorS(
"ordering not implemented for Letterplace rings");
873 char **names=(
char**)
omAlloc(
R->N*
sizeof(
char*));
876 for(
int i=r->N-1;
i>=0;
i--)
◆ id_IsInV()
int id_IsInV |
( |
ideal |
I, |
|
|
const ring |
r |
|
) |
| |
◆ k_SplitFrame()
void k_SplitFrame |
( |
poly & |
m1, |
|
|
poly & |
m2, |
|
|
int |
at, |
|
|
const ring |
r |
|
) |
| |
Definition at line 593 of file shiftop.cc.
595 int lV = r->isLPring;
◆ LPExpVString()
char* LPExpVString |
( |
int * |
expV, |
|
|
ring |
ri |
|
) |
| |
Definition at line 573 of file shiftop.cc.
576 for (
int i = 0;
i <= ri->N; ++
i)
583 if (
i % ri->isLPring == 0 &&
i != ri->N)
◆ p_FirstVblock()
int p_FirstVblock |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
◆ p_IsInV()
int p_IsInV |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
◆ p_LastVblock()
int p_LastVblock |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
◆ p_LPDivisibleBy()
◆ p_LPExpVappend()
void p_LPExpVappend |
( |
int * |
m1ExpV, |
|
|
int * |
m2ExpV, |
|
|
int |
m1Length, |
|
|
int |
m2Length, |
|
|
const ring |
ri |
|
) |
| |
Definition at line 506 of file shiftop.cc.
507 #ifdef SHIFT_MULT_DEBUG
512 int last = m1Length + m2Length;
515 Werror(
"degree bound of Letterplace ring is %d, but at least %d is needed for this multiplication", ri->N/ri->isLPring,
last/ri->isLPring);
518 for (
int i = 1 + m1Length;
i < 1 +
last; ++
i)
520 assume(m2ExpV[
i - m1Length] <= 1);
521 m1ExpV[
i] = m2ExpV[
i - m1Length];
524 assume(m1ExpV[0] == 0 || m2ExpV[0] == 0);
525 m1ExpV[0] += m2ExpV[0];
526 #ifdef SHIFT_MULT_DEBUG
◆ p_LPExpVprepend()
void p_LPExpVprepend |
( |
int * |
m1ExpV, |
|
|
int * |
m2ExpV, |
|
|
int |
m1Length, |
|
|
int |
m2Length, |
|
|
const ring |
ri |
|
) |
| |
Definition at line 532 of file shiftop.cc.
534 #ifdef SHIFT_MULT_DEBUG
539 int last = m1Length + m2Length;
542 Werror(
"degree bound of Letterplace ring is %d, but at least %d is needed for this multiplication", ri->N/ri->isLPring,
last/ri->isLPring);
547 for (
int i =
last;
i >= 1 + m2Length; --
i)
549 m1ExpV[
i] = m1ExpV[
i - m2Length];
553 for (
int i = 1;
i < 1 + m2Length; ++
i)
556 m1ExpV[
i] = m2ExpV[
i];
559 assume(m1ExpV[0] == 0 || m2ExpV[0] == 0);
560 m1ExpV[0] += m2ExpV[0];
561 #ifdef SHIFT_MULT_DEBUG
◆ p_LPLmDivisibleBy()
◆ p_LPshift()
void p_LPshift |
( |
poly |
p, |
|
|
int |
sh, |
|
|
const ring |
r |
|
) |
| |
◆ p_LPunshift()
void p_LPunshift |
( |
poly |
p, |
|
|
const ring |
ri |
|
) |
| |
◆ p_LPVarAt()
poly p_LPVarAt |
( |
poly |
p, |
|
|
int |
pos, |
|
|
const ring |
r |
|
) |
| |
Definition at line 751 of file shiftop.cc.
753 if (
p ==
NULL || pos < 1 || pos > (r->N / r->isLPring))
return NULL;
755 for (
int i = (pos-1) * r->isLPring + 1; i <= pos * r->isLPring;
i++) {
◆ p_mFirstVblock() [1/2]
int p_mFirstVblock |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
◆ p_mFirstVblock() [2/2]
int p_mFirstVblock |
( |
poly |
p, |
|
|
int * |
expV, |
|
|
const ring |
r |
|
) |
| |
Definition at line 489 of file shiftop.cc.
496 int lV = ri->isLPring;
499 while ( (!expV[
j]) && (j<=ri->
N-1) )
j++;
501 b = (int)(
j+lV-1)/lV;
◆ p_mIsInV()
int p_mIsInV |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
Definition at line 644 of file shiftop.cc.
646 int lV = r->isLPring;
652 int *e = (
int *)
omAlloc((r->N+1)*
sizeof(int));
653 int b = (int)((r->N+lV-1)/lV);
662 for (
i=(
j-1)*lV + 1;
i<=
j*lV;
i++)
664 if (e[
i])
B[
j] =
B[
j]+1;
676 if (
j==0)
goto ret_true;
◆ p_mLastVblock() [1/2]
int p_mLastVblock |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
◆ p_mLastVblock() [2/2]
int p_mLastVblock |
( |
poly |
p, |
|
|
int * |
expV, |
|
|
const ring |
r |
|
) |
| |
Definition at line 432 of file shiftop.cc.
439 int lV = ri->isLPring;
442 while ( (!expV[
j]) && (
j>=1) )
j--;
444 b = (int)((
j+lV-1)/lV);
◆ p_mLPshift()
void p_mLPshift |
( |
poly |
p, |
|
|
int |
sh, |
|
|
const ring |
r |
|
) |
| |
Definition at line 357 of file shiftop.cc.
361 int lV = ri->isLPring;
366 int *e=(
int *)
omAlloc((ri->N+1)*
sizeof(int));
367 int *
s=(
int *)
omAlloc0((ri->N+1)*
sizeof(int));
372 Werror(
"degree bound of Letterplace ring is %d, but at least %d is needed for this shift", ri->N/lV,
p_mLastVblock(
m, e, ri) + sh);
374 for (
int i = ri->N - sh*lV;
i > 0;
i--)
379 s[
i + (sh*lV)] = e[
i];
◆ p_mLPunshift()
void p_mLPunshift |
( |
poly |
m, |
|
|
const ring |
ri |
|
) |
| |
Definition at line 322 of file shiftop.cc.
326 int lV = ri->isLPring;
330 if (shift == 0)
return;
332 int *e=(
int *)
omAlloc((ri->N+1)*
sizeof(int));
333 int *
s=(
int *)
omAlloc0((ri->N+1)*
sizeof(int));
336 int expVoffset = shift*lV;
337 for (
int i = 1 + expVoffset;
i <= ri->N;
i++)
340 s[
i - expVoffset] = e[
i];
◆ shift_p_Minus_mm_Mult_qq()
poly shift_p_Minus_mm_Mult_qq |
( |
poly |
p, |
|
|
poly |
m, |
|
|
poly |
q, |
|
|
int & |
Shorter, |
|
|
const poly |
spNoether, |
|
|
const ring |
r |
|
) |
| |
Definition at line 268 of file shiftop.cc.
269 #ifdef SHIFT_MULT_DEBUG
277 #ifdef SHIFT_MULT_DEBUG
◆ shift_p_mm_Mult()
poly shift_p_mm_Mult |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
const ring |
r |
|
) |
| |
Definition at line 211 of file shiftop.cc.
213 #ifdef SHIFT_MULT_DEBUG
222 int lV = ri->isLPring;
224 #ifdef SHIFT_MULT_COMPAT_MODE
239 int *mExpV = (
int *)
omAlloc((ri->N+1)*
sizeof(int));
242 int *pExpV = (
int *)
omAlloc((ri->N+1)*
sizeof(int));
257 #ifdef SHIFT_MULT_COMPAT_MODE
260 #ifdef SHIFT_MULT_DEBUG
◆ shift_p_Mult_mm()
poly shift_p_Mult_mm |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
const ring |
r |
|
) |
| |
Definition at line 88 of file shiftop.cc.
90 #ifdef SHIFT_MULT_DEBUG
99 int lV = ri->isLPring;
101 #ifdef SHIFT_MULT_COMPAT_MODE
116 int *mExpV = (
int *)
omAlloc((ri->N+1)*
sizeof(int));
119 int *pExpV = (
int *)
omAlloc((ri->N+1)*
sizeof(int));
134 #ifdef SHIFT_MULT_COMPAT_MODE
137 #ifdef SHIFT_MULT_DEBUG
◆ shift_pp_mm_Mult()
poly shift_pp_mm_Mult |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
const ring |
r |
|
) |
| |
Definition at line 144 of file shiftop.cc.
146 #ifdef SHIFT_MULT_DEBUG
157 int lV = ri->isLPring;
159 #ifdef SHIFT_MULT_COMPAT_MODE
174 omBin bin = ri->PolyBin;
178 int *mExpV = (
int *)
omAlloc((ri->N+1)*
sizeof(int));
181 int *pExpV = (
int *)
omAlloc((ri->N+1)*
sizeof(int));
199 #ifdef SHIFT_MULT_COMPAT_MODE
203 #ifdef SHIFT_MULT_DEBUG
◆ shift_pp_Mult_Coeff_mm_DivSelect_STUB()
poly shift_pp_Mult_Coeff_mm_DivSelect_STUB |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
int & |
shorter, |
|
|
const ring |
r |
|
) |
| |
Definition at line 314 of file shiftop.cc.
315 PrintLn();
WarnS(
"pp_Mult_Coeff_mm_DivSelect is not supported yet by Letterplace. This might lead to unexpected behavior.");
◆ shift_pp_Mult_Coeff_mm_DivSelectMult_STUB()
poly shift_pp_Mult_Coeff_mm_DivSelectMult_STUB |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
const poly |
a, |
|
|
const poly |
b, |
|
|
int & |
shorter, |
|
|
const ring |
r |
|
) |
| |
Definition at line 309 of file shiftop.cc.
310 PrintLn();
WarnS(
"pp_Mult_Coeff_mm_DivSelectMult is not supported yet by Letterplace. This might lead to unexpected behavior.");
◆ shift_pp_Mult_mm()
poly shift_pp_Mult_mm |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
const ring |
r |
|
) |
| |
Definition at line 21 of file shiftop.cc.
23 #ifdef SHIFT_MULT_DEBUG
34 int lV = ri->isLPring;
36 #ifdef SHIFT_MULT_COMPAT_MODE
51 omBin bin = ri->PolyBin;
55 int *mExpV = (
int *)
omAlloc((ri->N+1)*
sizeof(int));
58 int *pExpV = (
int *)
omAlloc((ri->N+1)*
sizeof(int));
76 #ifdef SHIFT_MULT_COMPAT_MODE
80 #ifdef SHIFT_MULT_DEBUG
◆ shift_pp_Mult_mm_Noether_STUB()
poly shift_pp_Mult_mm_Noether_STUB |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
const poly |
spNoether, |
|
|
int & |
ll, |
|
|
const ring |
ri |
|
) |
| |
Definition at line 285 of file shiftop.cc.
286 PrintLn();
WarnS(
"pp_Mult_mm_Noether is not supported yet by Letterplace. Ignoring spNoether and using pp_Mult_mm. This might lead to unexpected behavior.");
◆ WriteLPExpV()
void WriteLPExpV |
( |
int * |
expV, |
|
|
ring |
ri |
|
) |
| |
static int si_min(const int a, const int b)
void p_LPunshift(poly p, const ring ri)
#define pIfThen1(cond, check)
void StringAppendS(const char *st)
static BOOLEAN p_LmIsConstantComp(const poly p, const ring r)
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 poly p_Head(poly p, const ring r)
copy the i(leading) term of p
static poly p_Neg(poly p, const ring r)
int p_mLastVblock(poly p, const ring ri)
void p_LPExpVprepend(int *m1ExpV, int *m2ExpV, int m1Length, int m2Length, const ring ri)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
void p_wrp(poly p, ring lmRing, ring tailRing)
const CanonicalForm CFMap CFMap & N
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
int p_IsInV(poly p, const ring r)
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
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
static unsigned pLength(poly a)
static void p_SetExpV(poly p, int *ev, const ring r)
static poly p_Copy(poly p, const ring r)
returns a copy of p
static BOOLEAN freeAlgebra_weights(const ring old_ring, ring new_ring, int p, int d)
substitute weights from orderings a,wp,Wp by d copies of it at position p
void PrintS(const char *s)
#define omFreeSize(addr, size)
void p_mLPshift(poly m, int sh, const ring ri)
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
static void p_GetExpV(poly p, int *ev, const ring r)
int p_LastVblock(poly p, const ring r)
void p_LPExpVappend(int *m1ExpV, int *m2ExpV, int m1Length, int m2Length, const ring ri)
static void p_Delete(poly *p, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
int p_mIsInV(poly p, const ring r)
void StringSetS(const char *st)
static int si_max(const int a, const int b)
int p_mFirstVblock(poly p, const ring ri)
void WriteLPExpV(int *expV, ring ri)
void Werror(const char *fmt,...)
static number p_SetCoeff(poly p, number n, ring r)
int p_FirstVblock(poly p, const ring r)
void WerrorS(const char *s)
void p_mLPunshift(poly m, const ring ri)
char * LPExpVString(int *expV, ring ri)
poly shift_pp_mm_Mult(poly p, const poly m, const ring ri)
#define p_LmCheckPolyRing1(p, r)
poly shift_pp_Mult_mm(poly p, const poly m, const ring ri)
static poly p_GetExp_k_n(poly p, int l, int k, const ring r)
const Variable & v
< [in] a sqrfree bivariate poly
static long p_Totaldegree(poly p, const ring r)
const CanonicalForm int s
#define p_AllocBin(p, bin, r)
#define p_MemCopy_LengthGeneral(d, s, length)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
BOOLEAN _p_LPLmDivisibleByNoComp(poly a, poly b, const ring r)
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...