 |
My Project
debian-1:4.1.1-p2+ds-4
|
Go to the source code of this file.
|
ideal | idInit (int idsize, int rank) |
| initialise an ideal / module More...
|
|
void | idShow (const ideal id, const ring lmRing, const ring tailRing, const int debugPrint) |
|
int | id_PosConstant (ideal id, const ring r) |
| index of generator with leading term in ground ring (if any); otherwise -1 More...
|
|
ideal | id_MaxIdeal (const ring r) |
| initialise the maximal ideal (at 0) More...
|
|
void | id_Delete (ideal *h, ring r) |
| deletes an ideal/module/matrix More...
|
|
void | id_ShallowDelete (ideal *h, ring r) |
| Shallowdeletes an ideal/matrix. More...
|
|
void | idSkipZeroes (ideal ide) |
| gives an ideal/module the minimal possible size More...
|
|
int | idElem (const ideal F) |
| count non-zero elements More...
|
|
ideal | id_CopyFirstK (const ideal ide, const int k, const ring r) |
| copies the first k (>= 1) entries of the given ideal/module and returns these as a new ideal/module (Note that the copied entries may be zero.) More...
|
|
void | id_Norm (ideal id, const ring r) |
| ideal id = (id[i]), result is leadcoeff(id[i]) = 1 More...
|
|
void | id_DelMultiples (ideal id, const ring r) |
| ideal id = (id[i]), c any unit if id[i] = c*id[j] then id[j] is deleted for j > i More...
|
|
void | id_DelEquals (ideal id, const ring r) |
| ideal id = (id[i]) if id[i] = id[j] then id[j] is deleted for j > i More...
|
|
void | id_DelLmEquals (ideal id, const ring r) |
| Delete id[j], if Lm(j) == Lm(i) and both LC(j), LC(i) are units and j > i. More...
|
|
void | id_DelDiv (ideal id, const ring r) |
| delete id[j], if LT(j) == coeff*mon*LT(i) and vice versa, i.e., delete id[i], if LT(i) == coeff*mon*LT(j) More...
|
|
BOOLEAN | id_IsConstant (ideal id, const ring r) |
| test if the ideal has only constant polynomials NOTE: zero ideal/module is also constant More...
|
|
ideal | id_Copy (ideal h1, const ring r) |
| copy an ideal More...
|
|
void | id_DBTest (ideal h1, int level, const char *f, const int l, const ring r, const ring tailRing) |
| Internal verification for ideals/modules and dense matrices! More...
|
|
static int | p_Comp_RevLex (poly a, poly b, BOOLEAN nolex, const ring R) |
| for idSort: compare a and b revlex inclusive module comp. More...
|
|
intvec * | id_Sort (const ideal id, const BOOLEAN nolex, const ring r) |
| sorts the ideal w.r.t. the actual ringordering uses lex-ordering when nolex = FALSE More...
|
|
ideal | id_SimpleAdd (ideal h1, ideal h2, const ring R) |
| concat the lists h1 and h2 without zeros More...
|
|
BOOLEAN | idInsertPoly (ideal h1, poly h2) |
| insert h2 into h1 (if h2 is not the zero polynomial) return TRUE iff h2 was indeed inserted More...
|
|
BOOLEAN | idInsertPolyOnPos (ideal I, poly p, int pos) |
| insert p into I on position pos More...
|
|
BOOLEAN | id_InsertPolyWithTests (ideal h1, const int validEntries, const poly h2, const bool zeroOk, const bool duplicateOk, const ring r) |
| insert h2 into h1 depending on the two boolean parameters: More...
|
|
ideal | id_Add (ideal h1, ideal h2, const ring r) |
| h1 + h2 More...
|
|
ideal | id_Mult (ideal h1, ideal h2, const ring R) |
| h1 * h2 one h_i must be an ideal (with at least one column) the other h_i may be a module (with no columns at all) More...
|
|
BOOLEAN | idIs0 (ideal h) |
| returns true if h is the zero ideal More...
|
|
long | id_RankFreeModule (ideal s, ring lmRing, ring tailRing) |
| return the maximal component number found in any polynomial in s More...
|
|
BOOLEAN | id_HomIdeal (ideal id, ideal Q, const ring r) |
|
void | idInitChoise (int r, int beg, int end, BOOLEAN *endch, int *choise) |
|
void | idGetNextChoise (int r, int end, BOOLEAN *endch, int *choise) |
|
int | idGetNumberOfChoise (int t, int d, int begin, int end, int *choise) |
|
int | binom (int n, int r) |
|
ideal | id_FreeModule (int i, const ring r) |
| the free module of rank i More...
|
|
static void | makemonoms (int vars, int actvar, int deg, int monomdeg, const ring r) |
|
ideal | id_MaxIdeal (int deg, const ring r) |
|
static void | id_NextPotence (ideal given, ideal result, int begin, int end, int deg, int restdeg, poly ap, const ring r) |
|
ideal | id_Power (ideal given, int exp, const ring r) |
|
void | id_Compactify (ideal id, const ring r) |
|
ideal | id_Head (ideal h, const ring r) |
| returns the ideals of initial terms More...
|
|
ideal | id_Homogen (ideal h, int varnum, const ring r) |
|
ideal | id_Vec2Ideal (poly vec, const ring R) |
|
poly | id_Array2Vector (poly *m, unsigned n, const ring R) |
| for julia: convert an array of poly to vector More...
|
|
ideal | id_Matrix2Module (matrix mat, const ring R) |
| converts mat to module, destroys mat More...
|
|
matrix | id_Module2Matrix (ideal mod, const ring R) |
|
matrix | id_Module2formatedMatrix (ideal mod, int rows, int cols, const ring R) |
|
ideal | id_Subst (ideal id, int n, poly e, const ring r) |
|
BOOLEAN | id_HomModule (ideal m, ideal Q, intvec **w, const ring R) |
|
ideal | id_Jet (const ideal i, int d, const ring R) |
|
ideal | id_JetW (const ideal i, int d, intvec *iv, const ring R) |
|
int | id_ReadOutPivot (ideal arg, int *comp, const ring r) |
|
intvec * | id_QHomWeight (ideal id, const ring r) |
|
BOOLEAN | id_IsZeroDim (ideal I, const ring r) |
|
void | id_Normalize (ideal I, const ring r) |
| normialize all polys in id More...
|
|
int | id_MinDegW (ideal M, intvec *w, const ring r) |
|
ideal | id_Transp (ideal a, const ring rRing) |
| transpose a module More...
|
|
ideal | id_TensorModuleMult (const int m, const ideal M, const ring rRing) |
|
ideal | id_ChineseRemainder (ideal *xx, number *q, int rl, const ring r) |
|
void | id_Shift (ideal M, int s, const ring r) |
|
ideal | id_Delete_Pos (const ideal I, const int p, const ring r) |
|
◆ binom()
int binom |
( |
int |
n, |
|
|
int |
r |
|
) |
| |
◆ id_Add()
ideal id_Add |
( |
ideal |
h1, |
|
|
ideal |
h2, |
|
|
const ring |
r |
|
) |
| |
◆ id_Array2Vector()
poly id_Array2Vector |
( |
poly * |
m, |
|
|
unsigned |
n, |
|
|
const ring |
R |
|
) |
| |
for julia: convert an array of poly to vector
Definition at line 1143 of file simpleideals.cc.
1150 for(
unsigned j=0;
j<n ;
j++)
◆ id_ChineseRemainder()
ideal id_ChineseRemainder |
( |
ideal * |
xx, |
|
|
number * |
q, |
|
|
int |
rl, |
|
|
const ring |
r |
|
) |
| |
Definition at line 1763 of file simpleideals.cc.
1766 int cnt=0;
int rw=0;
int cl=0;
1769 for(
j=rl-1;
j>=0;
j--)
1773 if (xx[
j]->
nrows >rw) rw=xx[
j]->nrows;
1778 WerrorS(
"format mismatch in CRT");
1784 number *
x=(number *)
omAlloc(rl*
sizeof(number));
1785 poly *
p=(poly *)
omAlloc(rl*
sizeof(poly));
1790 for(
i=cnt-1;
i>=0;
i--)
1792 for(
j=rl-1;
j>=0;
j--)
1800 for(
j=rl-1;
j>=0;
j--)
◆ id_Compactify()
void id_Compactify |
( |
ideal |
id, |
|
|
const ring |
r |
|
) |
| |
◆ id_Copy()
ideal id_Copy |
( |
ideal |
h1, |
|
|
const ring |
r |
|
) |
| |
◆ id_CopyFirstK()
copies the first k (>= 1) entries of the given ideal/module and returns these as a new ideal/module (Note that the copied entries may be zero.)
Definition at line 225 of file simpleideals.cc.
233 ideal newI =
idInit(
k, ide->rank);
235 for (
int i = 0;
i <
k;
i++)
◆ id_DBTest()
void id_DBTest |
( |
ideal |
h1, |
|
|
int |
level, |
|
|
const char * |
f, |
|
|
const int |
l, |
|
|
const ring |
r, |
|
|
const ring |
tailRing |
|
) |
| |
Internal verification for ideals/modules and dense matrices!
Definition at line 415 of file simpleideals.cc.
428 const int n = (h1->ncols * h1->nrows);
432 if( h1->m !=
NULL && n > 0 )
438 for (
int i=n - 1;
i >= 0;
i--)
442 if (
k > new_rk) new_rk =
k;
447 assume( !( h1->nrows == h1->rank && h1->nrows > 1 && new_rk > 0 ) );
449 if(new_rk > h1->rank)
452 h1->rank, new_rk,
f,
l);
459 Print(
"error: ideal==NULL in %s:%d\n",
f,
l);
◆ id_DelDiv()
void id_DelDiv |
( |
ideal |
id, |
|
|
const ring |
r |
|
) |
| |
delete id[j], if LT(j) == coeff*mon*LT(i) and vice versa, i.e., delete id[i], if LT(i) == coeff*mon*LT(j)
Definition at line 341 of file simpleideals.cc.
350 if (id->m[
i] !=
NULL)
◆ id_DelEquals()
void id_DelEquals |
( |
ideal |
id, |
|
|
const ring |
r |
|
) |
| |
ideal id = (id[i]) if id[i] = id[j] then id[j] is deleted for j > i
Definition at line 290 of file simpleideals.cc.
◆ id_Delete()
void id_Delete |
( |
ideal * |
h, |
|
|
ring |
r |
|
) |
| |
deletes an ideal/module/matrix
Definition at line 113 of file simpleideals.cc.
121 const int elems = (*h)->nrows * (*h)->ncols;
133 poly
pp=((*h)->m[
j]);
◆ id_Delete_Pos()
◆ id_DelLmEquals()
void id_DelLmEquals |
( |
ideal |
id, |
|
|
const ring |
r |
|
) |
| |
Delete id[j], if Lm(j) == Lm(i) and both LC(j), LC(i) are units and j > i.
Definition at line 313 of file simpleideals.cc.
322 if (id->m[
i] !=
NULL)
326 if ((id->m[
j] !=
NULL)
◆ id_DelMultiples()
void id_DelMultiples |
( |
ideal |
id, |
|
|
const ring |
r |
|
) |
| |
ideal id = (id[i]), c any unit if id[i] = c*id[j] then id[j] is deleted for j > i
Definition at line 255 of file simpleideals.cc.
◆ id_FreeModule()
ideal id_FreeModule |
( |
int |
i, |
|
|
const ring |
r |
|
) |
| |
◆ id_Head()
ideal id_Head |
( |
ideal |
h, |
|
|
const ring |
r |
|
) |
| |
◆ id_HomIdeal()
◆ id_HomModule()
Definition at line 1297 of file simpleideals.cc.
1308 long cmax=1,order=0,ord,*
diff,diffmin=32000;
1328 iscom = (
int *)
omAlloc0(cmax*
sizeof(
int));
1368 ord =
R->pFDeg(
p,
R);
1405 for (
i=1;
i<cmax;
i++) (**
w)[
i-1]=(int)(
diff[
i]);
1406 for (
i=1;
i<cmax;
i++)
1412 for (
i=1;
i<cmax;
i++)
1414 (**w)[
i-1]=(int)(
diff[
i]-diffmin);
◆ id_Homogen()
ideal id_Homogen |
( |
ideal |
h, |
|
|
int |
varnum, |
|
|
const ring |
r |
|
) |
| |
◆ id_InsertPolyWithTests()
insert h2 into h1 depending on the two boolean parameters:
- if zeroOk is true, then h2 will also be inserted when it is zero
- if duplicateOk is true, then h2 will also be inserted when it is already present in h1 return TRUE iff h2 was indeed inserted
Definition at line 685 of file simpleideals.cc.
692 if ((!zeroOk) && (h2 ==
NULL))
return FALSE;
695 bool h2FoundInH1 =
false;
697 while ((
i < validEntries) && (!h2FoundInH1))
702 if (h2FoundInH1)
return FALSE;
704 if (validEntries ==
IDELEMS(h1))
709 h1->m[validEntries] = h2;
◆ id_IsConstant()
test if the ideal has only constant polynomials NOTE: zero ideal/module is also constant
Definition at line 390 of file simpleideals.cc.
◆ id_IsZeroDim()
◆ id_Jet()
ideal id_Jet |
( |
const ideal |
i, |
|
|
int |
d, |
|
|
const ring |
R |
|
) |
| |
◆ id_JetW()
◆ id_Matrix2Module()
converts mat to module, destroys mat
Definition at line 1166 of file simpleideals.cc.
1178 for (
i=1;
i<=mr ;
i++)
◆ id_MaxIdeal() [1/2]
ideal id_MaxIdeal |
( |
const ring |
r | ) |
|
◆ id_MaxIdeal() [2/2]
ideal id_MaxIdeal |
( |
int |
deg, |
|
|
const ring |
r |
|
) |
| |
◆ id_MinDegW()
◆ id_Module2formatedMatrix()
matrix id_Module2formatedMatrix |
( |
ideal |
mod, |
|
|
int |
rows, |
|
|
int |
cols, |
|
|
const ring |
R |
|
) |
| |
Definition at line 1246 of file simpleideals.cc.
1253 if (r>rows) r = rows;
1254 if (c>cols) c = cols;
◆ id_Module2Matrix()
◆ id_Mult()
ideal id_Mult |
( |
ideal |
h1, |
|
|
ideal |
h2, |
|
|
const ring |
R |
|
) |
| |
h1 * h2 one h_i must be an ideal (with at least one column) the other h_i may be a module (with no columns at all)
Definition at line 726 of file simpleideals.cc.
733 while ((
j > 0) && (h1->m[
j-1] ==
NULL))
j--;
736 while ((
i > 0) && (h2->m[
i-1] ==
NULL))
i--;
739 int r =
si_max( h2->rank, h1->rank );
750 if (h1->m[
i] !=
NULL)
754 if (h2->m[
j] !=
NULL)
◆ id_NextPotence()
static void id_NextPotence |
( |
ideal |
given, |
|
|
ideal |
result, |
|
|
int |
begin, |
|
|
int |
end, |
|
|
int |
deg, |
|
|
int |
restdeg, |
|
|
poly |
ap, |
|
|
const ring |
r |
|
) |
| |
|
static |
Definition at line 1033 of file simpleideals.cc.
1050 if (begin == end)
return;
1051 for (
i=restdeg-1;
i>0;
i--)
◆ id_Norm()
void id_Norm |
( |
ideal |
id, |
|
|
const ring |
r |
|
) |
| |
ideal id = (id[i]), result is leadcoeff(id[i]) = 1
Definition at line 241 of file simpleideals.cc.
247 if (id->m[
i] !=
NULL)
◆ id_Normalize()
void id_Normalize |
( |
ideal |
I, |
|
|
const ring |
r |
|
) |
| |
normialize all polys in id
Definition at line 1600 of file simpleideals.cc.
1605 for(
i=I->nrows*I->ncols-1;
i>=0;
i--)
◆ id_PosConstant()
int id_PosConstant |
( |
ideal |
id, |
|
|
const ring |
r |
|
) |
| |
index of generator with leading term in ground ring (if any); otherwise -1
Definition at line 81 of file simpleideals.cc.
86 const poly *
m =
id->m +
N;
88 for (
int k =
N;
k >= 0; --
k, --
m)
◆ id_Power()
ideal id_Power |
( |
ideal |
given, |
|
|
int |
exp, |
|
|
const ring |
r |
|
) |
| |
◆ id_QHomWeight()
Definition at line 1534 of file simpleideals.cc.
1539 int in=
IDELEMS(
id)-1, ready=0, all=0,
1540 coldim=
rVar(r), rowmax=2*coldim;
1541 if (in<0)
return NULL;
1553 for (
k=1;
k<=coldim;
k++)
◆ id_RankFreeModule()
long id_RankFreeModule |
( |
ideal |
s, |
|
|
ring |
lmRing, |
|
|
ring |
tailRing |
|
) |
| |
return the maximal component number found in any polynomial in s
Definition at line 781 of file simpleideals.cc.
◆ id_ReadOutPivot()
int id_ReadOutPivot |
( |
ideal |
arg, |
|
|
int * |
comp, |
|
|
const ring |
r |
|
) |
| |
Definition at line 1457 of file simpleideals.cc.
1460 if (
idIs0(arg))
return -1;
1461 int i=0,
j, generator=-1;
1462 int rk_arg=arg->rank;
1463 int * componentIsUsed =(
int *)
omAlloc((rk_arg+1)*
sizeof(int));
1466 while ((generator<0) && (
i<
IDELEMS(arg)))
1468 memset(componentIsUsed,0,(rk_arg+1)*
sizeof(
int));
1473 if (componentIsUsed[
j]==0)
1479 componentIsUsed[
j] = 1;
1483 componentIsUsed[
j] = -1;
1486 else if (componentIsUsed[
j]>0)
1488 (componentIsUsed[
j])++;
1496 for (
j=0;
j<=rk_arg;
j++)
1498 if (componentIsUsed[
j]>0)
1500 if ((*
comp==-1) || (componentIsUsed[
j]<
i))
1503 i= componentIsUsed[
j];
◆ id_ShallowDelete()
void id_ShallowDelete |
( |
ideal * |
h, |
|
|
ring |
r |
|
) |
| |
Shallowdeletes an ideal/matrix.
Definition at line 147 of file simpleideals.cc.
156 elems=
j=(*h)->nrows*(*h)->ncols;
◆ id_Shift()
void id_Shift |
( |
ideal |
M, |
|
|
int |
s, |
|
|
const ring |
r |
|
) |
| |
◆ id_SimpleAdd()
ideal id_SimpleAdd |
( |
ideal |
h1, |
|
|
ideal |
h2, |
|
|
const ring |
R |
|
) |
| |
concat the lists h1 and h2 without zeros
Definition at line 597 of file simpleideals.cc.
606 if (
res->rank<h1->rank)
res->rank=h1->rank;
612 if (
res->rank<h2->rank)
res->rank=h2->rank;
617 while ((
j >= 0) && (h1->m[
j] ==
NULL))
j--;
620 while ((
i >= 0) && (h2->m[
i] ==
NULL))
i--;
622 const int r =
si_max(h1->rank, h2->rank);
632 for (
l=
i;
l>=0;
l--,
j--)
◆ id_Sort()
sorts the ideal w.r.t. the actual ringordering uses lex-ordering when nolex = FALSE
Definition at line 502 of file simpleideals.cc.
508 int i,
j, actpos=0, newpos;
509 int diff, olddiff, lastcomp, newcomp;
518 diff = (actpos+1) / 2;
534 while (notFound && (newpos>=0) && (newpos<actpos))
544 && (newpos+
diff>=actpos))
546 diff = actpos-newpos-1;
548 else if ((newcomp==-1)
557 if ((olddiff==1) && (lastcomp>0))
564 if ((olddiff==1) && (lastcomp<0))
581 if (newpos<0) newpos = 0;
582 if (newpos>actpos) newpos = actpos;
585 for (
j=actpos;
j>newpos;
j--)
587 (*result)[
j] = (*result)[
j-1];
589 (*result)[newpos] =
i;
◆ id_Subst()
ideal id_Subst |
( |
ideal |
id, |
|
|
int |
n, |
|
|
poly |
e, |
|
|
const ring |
r |
|
) |
| |
◆ id_TensorModuleMult()
Definition at line 1683 of file simpleideals.cc.
1692 const int n = rRing->N;
1700 for(
int i = 0;
i <
k;
i++ )
1702 poly pTempSum =
NULL;
1727 if( cc == 0) cc =
m;
1728 int vv = 1 + (gen - cc) /
m;
1740 assume( (cc + (vv-1)*
m) == gen );
1747 pTempSum =
p_Add_q(pTempSum,
h, rRing);
1752 idTemp->m[
i] = pTempSum;
1757 ideal idResult =
id_Transp(idTemp, rRing);
◆ id_Transp()
ideal id_Transp |
( |
ideal |
a, |
|
|
const ring |
rRing |
|
) |
| |
◆ id_Vec2Ideal()
ideal id_Vec2Ideal |
( |
poly |
vec, |
|
|
const ring |
R |
|
) |
| |
◆ idElem()
int idElem |
( |
const ideal |
F | ) |
|
count non-zero elements
number of non-zero polys in F
Definition at line 209 of file simpleideals.cc.
◆ idGetNextChoise()
void idGetNextChoise |
( |
int |
r, |
|
|
int |
end, |
|
|
BOOLEAN * |
endch, |
|
|
int * |
choise |
|
) |
| |
Definition at line 854 of file simpleideals.cc.
858 while ((
i >= 0) && (choise[
i] == end))
868 for (
j=
i+1;
j<r;
j++)
870 choise[
j] = choise[
i]+
j-
i;
◆ idGetNumberOfChoise()
int idGetNumberOfChoise |
( |
int |
t, |
|
|
int |
d, |
|
|
int |
begin, |
|
|
int |
end, |
|
|
int * |
choise |
|
) |
| |
Definition at line 880 of file simpleideals.cc.
887 localchoise=(
int*)
omAlloc((d-1)*
sizeof(int));
893 while ((
i<t) && (localchoise[
i]==choise[
i]))
i++;
897 while ((
i<d) && (localchoise[
i-1]==choise[
i]))
i++;
◆ idInit()
ideal idInit |
( |
int |
idsize, |
|
|
int |
rank |
|
) |
| |
initialise an ideal / module
creates an ideal / module
Definition at line 36 of file simpleideals.cc.
39 assume( idsize >= 0 && rank >= 0 );
49 hh->m = (poly *)
omAlloc0(idsize*
sizeof(poly));
◆ idInitChoise()
void idInitChoise |
( |
int |
r, |
|
|
int |
beg, |
|
|
int |
end, |
|
|
BOOLEAN * |
endch, |
|
|
int * |
choise |
|
) |
| |
◆ idInsertPoly()
BOOLEAN idInsertPoly |
( |
ideal |
h1, |
|
|
poly |
h2 |
|
) |
| |
insert h2 into h1 (if h2 is not the zero polynomial) return TRUE iff h2 was indeed inserted
Definition at line 639 of file simpleideals.cc.
647 while ((
j >= 0) && (h1->m[
j] ==
NULL))
j--;
◆ idInsertPolyOnPos()
BOOLEAN idInsertPolyOnPos |
( |
ideal |
I, |
|
|
poly |
p, |
|
|
int |
pos |
|
) |
| |
insert p into I on position pos
Definition at line 658 of file simpleideals.cc.
666 while ((
j >= 0) && (I->m[
j] ==
NULL))
j--;
◆ idIs0()
◆ idShow()
Definition at line 58 of file simpleideals.cc.
67 Print(
"Module of rank %ld,real rank %ld and %d generators.\n",
70 int j = (
id->ncols*
id->nrows) - 1;
71 while ((
j > 0) && (
id->m[
j]==
NULL))
j--;
72 for (
int i = 0;
i <=
j;
i++)
◆ idSkipZeroes()
void idSkipZeroes |
( |
ideal |
ide | ) |
|
gives an ideal/module the minimal possible size
Definition at line 171 of file simpleideals.cc.
182 if (ide->m[
k] !=
NULL)
187 ide->m[
j] = ide->m[
k];
◆ makemonoms()
static void makemonoms |
( |
int |
vars, |
|
|
int |
actvar, |
|
|
int |
deg, |
|
|
int |
monomdeg, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ p_Comp_RevLex()
static int p_Comp_RevLex |
( |
poly |
a, |
|
|
poly |
b, |
|
|
BOOLEAN |
nolex, |
|
|
const ring |
R |
|
) |
| |
|
static |
for idSort: compare a and b revlex inclusive module comp.
Definition at line 465 of file simpleideals.cc.
468 if (
b==
NULL)
return 1;
469 if (a==
NULL)
return -1;
◆ idpower
◆ idpowerpoint
◆ sip_sideal_bin
#define omdebugAddrSize(addr, size)
ideal id_SimpleAdd(ideal h1, ideal h2, const ring R)
concat the lists h1 and h2 without zeros
int dReportError(const char *fmt,...)
#define omCheckAddrSize(addr, size)
void sBucketClearMerge(sBucket_pt bucket, poly *p, int *length)
poly p_Subst(poly p, int n, poly e, const ring r)
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:
void p_Normalize(poly p, const ring r)
static int p_Comp_RevLex(poly a, poly b, BOOLEAN nolex, const ring R)
for idSort: compare a and b revlex inclusive module comp.
#define MATELEM(mat, i, j)
void pEnlargeSet(poly **p, int l, int increment)
long(* pFDegProc)(poly p, ring r)
static poly p_Head(poly p, const ring r)
BOOLEAN p_ComparePolys(poly p1, poly p2, const ring r)
returns TRUE if p1 is a skalar multiple of p2 assume p1 != NULL and p2 != NULL
static void p_SetCompP(poly p, int i, ring r)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
ideal id_MaxIdeal(const ring r)
initialise the maximal ideal (at 0)
poly p_Homogen(poly p, int varnum, const ring r)
short * iv2array(intvec *iv, const ring R)
static BOOLEAN length(leftv result, leftv arg)
poly p_ChineseRemainder(poly *xx, number *x, number *q, int rl, CFArray &inv_cache, const ring R)
#define __p_GetComp(p, r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
void p_wrp(poly p, ring lmRing, ring tailRing)
ideal id_Copy(ideal h1, const ring r)
copy an ideal
const CanonicalForm CFMap CFMap & N
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
BOOLEAN p_IsHomogeneous(poly p, const ring r)
BOOLEAN id_HomIdeal(ideal id, ideal Q, const ring r)
#define p_LmEqual(p1, p2, 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
static unsigned pLength(poly a)
static poly p_Copy(poly p, const ring r)
returns a copy of p
poly p_Power(poly p, int i, const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
void PrintS(const char *s)
#define omFreeSize(addr, size)
void sBucket_Merge_p(sBucket_pt bucket, poly p, int length)
Merges p into Spoly: assumes Bpoly and p have no common monoms destroys p!
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static BOOLEAN rField_is_Ring(const ring r)
void id_DelEquals(ideal id, const ring r)
ideal id = (id[i]) if id[i] = id[j] then id[j] is deleted for j > i
sBucket_pt sBucketCreate(const ring r)
static void makemonoms(int vars, int actvar, int deg, int monomdeg, const ring r)
void id_DelMultiples(ideal id, const ring r)
ideal id = (id[i]), c any unit if id[i] = c*id[j] then id[j] is deleted for j > i
void ivTriangIntern(intvec *imat, int &ready, int &all)
static poly pp_Mult_qq(poly p, poly q, const ring r)
static int p_LtCmp(poly p, poly q, const ring r)
static BOOLEAN p_DivisibleBy(poly a, poly b, const ring r)
int p_MinDeg(poly p, intvec *w, const ring R)
void idGetNextChoise(int r, int end, BOOLEAN *endch, int *choise)
static BOOLEAN p_IsUnit(const poly p, const ring r)
void p_ShallowDelete(poly *p, const ring r)
matrix mpNew(int r, int c)
create a r x c zero-matrix
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
poly pp_JetW(poly p, int m, short *w, const ring R)
gmp_float exp(const gmp_float &a)
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
poly pp_Jet(poly p, int m, const ring R)
int p_IsPurePower(const poly p, const ring r)
return i, if head depends only on var(i)
#define IMATELEM(M, I, J)
static void p_Delete(poly *p, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
BOOLEAN p_EqualPolys(poly p1, poly p2, const ring r)
static int si_max(const int a, const int b)
void idInitChoise(int r, int beg, int end, BOOLEAN *endch, int *choise)
#define rRing_has_Comp(r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
#define pp_Test(p, lmRing, tailRing)
void p_Vec2Polys(poly v, poly **p, int *len, const ring r)
static FORCE_INLINE BOOLEAN n_GreaterZero(number n, const coeffs r)
ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2),...
#define id_TestTail(A, lR, tR)
void WerrorS(const char *s)
static long p_GetExpDiff(poly p1, poly p2, int i, ring r)
static BOOLEAN rField_has_simple_inverse(const ring r)
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
static void p_Setm(poly p, const ring r)
static void id_NextPotence(ideal given, ideal result, int begin, int end, int deg, int restdeg, poly ap, const ring r)
static long p_IncrExp(poly p, int v, ring r)
static long p_Totaldegree(poly p, const ring r)
static BOOLEAN p_IsConstantPoly(const poly p, const ring r)
const CanonicalForm int s
void p_Norm(poly p1, const ring r)
int comp(const CanonicalForm &A, const CanonicalForm &B)
compare polynomials
static poly p_Mult_q(poly p, poly q, const ring r)
void id_Compactify(ideal id, const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
intvec * ivSolveKern(intvec *imat, int dimtr)
ideal id_Transp(ideal a, const ring rRing)
transpose a module
BOOLEAN _pp_Test(poly p, ring lmRing, ring tailRing, int level)
void sBucketDestroy(sBucket_pt *bucket)
#define omFreeBin(addr, bin)
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
BOOLEAN p_DivisibleByRingCase(poly f, poly g, const ring r)
divisibility check over ground ring (which may contain zero divisors); TRUE iff LT(f) divides LT(g),...
static FORCE_INLINE BOOLEAN n_IsUnit(number n, const coeffs r)
TRUE iff n has a multiplicative inverse in the given coeff field/ring r.
static poly pReverse(poly p)
static poly p_SortMerge(poly p, const ring r, BOOLEAN revert=FALSE)
void omPrintAddrInfo(FILE *fd, void *addr, const char *s)