Functions
singularWishlist.h File Reference
#include <polys/monomials/p_polys.h>
#include <libpolys/polys/simpleideals.h>

Go to the source code of this file.

Functions

static BOOLEAN _p_LeadmonomDivisibleByNoComp (poly a, poly b, const ring r)
 
static BOOLEAN p_LeadmonomDivisibleBy (poly a, poly b, const ring r)
 p_LmDivisibleBy checks also the divisibility of coefficients More...
 
void idShallowDelete (ideal *h)
 id_ShallowDelete deletes the monomials of the polynomials stored inside of it More...
 
void deleteOrdering (ring r)
 
void z_Write (number p, ring r)
 
void id_Write (const ideal I, const ring r)
 

Function Documentation

§ _p_LeadmonomDivisibleByNoComp()

static BOOLEAN _p_LeadmonomDivisibleByNoComp ( poly  a,
poly  b,
const ring  r 
)
inlinestatic

Definition at line 7 of file singularWishlist.h.

8 {
9  int i=r->VarL_Size - 1;
10  unsigned long divmask = r->divmask;
11  unsigned long la, lb;
12 
13  if (r->VarL_LowIndex >= 0)
14  {
15  i += r->VarL_LowIndex;
16  do
17  {
18  la = a->exp[i];
19  lb = b->exp[i];
20  if ((la > lb) ||
21  (((la & divmask) ^ (lb & divmask)) != ((lb - la) & divmask)))
22  {
24  return FALSE;
25  }
26  i--;
27  }
28  while (i>=r->VarL_LowIndex);
29  }
30  else
31  {
32  do
33  {
34  la = a->exp[r->VarL_Offset[i]];
35  lb = b->exp[r->VarL_Offset[i]];
36  if ((la > lb) ||
37  (((la & divmask) ^ (lb & divmask)) != ((lb - la) & divmask)))
38  {
40  return FALSE;
41  }
42  i--;
43  }
44  while (i>=0);
45  }
47  return TRUE;
48 }
const poly a
Definition: syzextra.cc:212
#define FALSE
Definition: auxiliary.h:95
BOOLEAN p_DebugLmDivisibleByNoComp(poly a, poly b, ring r)
Definition: pDebug.cc:140
#define TRUE
Definition: auxiliary.h:99
const ring r
Definition: syzextra.cc:208
int i
Definition: cfEzgcd.cc:123
#define pDivAssume(x)
Definition: p_polys.h:1205
const poly b
Definition: syzextra.cc:213

§ deleteOrdering()

void deleteOrdering ( ring  r)
inline

Definition at line 80 of file singularWishlist.h.

81 {
82  if (r->order != NULL)
83  {
84  int i=rBlocks(r);
85  assume(r->block0 != NULL && r->block1 != NULL && r->wvhdl != NULL);
86  /* delete order */
87  omFreeSize((ADDRESS)r->order,i*sizeof(int));
88  omFreeSize((ADDRESS)r->block0,i*sizeof(int));
89  omFreeSize((ADDRESS)r->block1,i*sizeof(int));
90  /* delete weights */
91  for (int j=0; j<i; j++)
92  if (r->wvhdl[j]!=NULL)
93  omFree(r->wvhdl[j]);
94  omFreeSize((ADDRESS)r->wvhdl,i*sizeof(int *));
95  }
96  else
97  assume(r->block0 == NULL && r->block1 == NULL && r->wvhdl == NULL);
98  return;
99 }
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
void * ADDRESS
Definition: auxiliary.h:116
static int rBlocks(ring r)
Definition: ring.h:556
const ring r
Definition: syzextra.cc:208
int j
Definition: myNF.cc:70
#define omFree(addr)
Definition: omAllocDecl.h:261
#define assume(x)
Definition: mod2.h:403
int i
Definition: cfEzgcd.cc:123
#define NULL
Definition: omList.c:10

§ id_Write()

void id_Write ( const ideal  I,
const ring  r 
)

Definition at line 13 of file singularWishlist.cc.

14 {
15  for (int i=0; i<IDELEMS(I); i++)
16  p_Write(I->m[i],r);
17 }
const ring r
Definition: syzextra.cc:208
int i
Definition: cfEzgcd.cc:123
#define IDELEMS(i)
Definition: simpleideals.h:24
void p_Write(poly p, ring lmRing, ring tailRing)
Definition: polys0.cc:206

§ idShallowDelete()

void idShallowDelete ( ideal *  h)
inline

id_ShallowDelete deletes the monomials of the polynomials stored inside of it

Definition at line 66 of file singularWishlist.h.

67 {
68  if (*h != NULL)
69  {
70  int k;
71  k=(*h)->nrows*(*h)->ncols;
72  if (k>0)
73  omFreeSize((ADDRESS)((*h)->m),sizeof(poly)*k);
75  *h=NULL;
76  }
77  return;
78 }
omBin sip_sideal_bin
Definition: simpleideals.cc:30
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
void * ADDRESS
Definition: auxiliary.h:116
int k
Definition: cfEzgcd.cc:93
#define NULL
Definition: omList.c:10
polyrec * poly
Definition: hilb.h:10
#define omFreeBin(addr, bin)
Definition: omAllocDecl.h:259
static Poly * h
Definition: janet.cc:978

§ p_LeadmonomDivisibleBy()

static BOOLEAN p_LeadmonomDivisibleBy ( poly  a,
poly  b,
const ring  r 
)
inlinestatic

p_LmDivisibleBy checks also the divisibility of coefficients

Definition at line 53 of file singularWishlist.h.

54 {
56 
58  if (p_GetComp(a, r) == 0 || p_GetComp(a,r) == p_GetComp(b,r))
60  return FALSE;
61 }
const poly a
Definition: syzextra.cc:212
#define FALSE
Definition: auxiliary.h:95
#define p_GetComp(p, r)
Definition: monomials.h:72
static BOOLEAN _p_LeadmonomDivisibleByNoComp(poly a, poly b, const ring r)
const ring r
Definition: syzextra.cc:208
#define p_LmCheckPolyRing1(p, r)
Definition: monomials.h:185
#define pIfThen1(cond, check)
Definition: monomials.h:187
#define NULL
Definition: omList.c:10
const poly b
Definition: syzextra.cc:213

§ z_Write()

void z_Write ( number  p,
ring  r 
)

Definition at line 5 of file singularWishlist.cc.

6 {
7  poly g = p_One(r);
8  p_SetCoeff(g,p,r);
9  p_Write(g,r);
10  return;
11 }
return P p
Definition: myNF.cc:203
g
Definition: cfModGcd.cc:4031
static number p_SetCoeff(poly p, number n, ring r)
Definition: p_polys.h:407
const ring r
Definition: syzextra.cc:208
poly p_One(const ring r)
Definition: p_polys.cc:1312
void p_Write(poly p, ring lmRing, ring tailRing)
Definition: polys0.cc:206
polyrec * poly
Definition: hilb.h:10