My Project
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...
 
static void idShallowDelete (ideal *h)
 id_ShallowDelete deletes the monomials of the polynomials stored inside of it More...
 
static 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}
#define TRUE
Definition: auxiliary.h:100
#define FALSE
Definition: auxiliary.h:96
int i
Definition: cfEzgcd.cc:132
CanonicalForm b
Definition: cfModGcd.cc:4103
BOOLEAN p_DebugLmDivisibleByNoComp(poly a, poly b, ring r)
Definition: pDebug.cc:141
#define pDivAssume(x)
Definition: p_polys.h:1280

◆ deleteOrdering()

static void deleteOrdering ( ring  r)
inlinestatic

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(rRingOrder_t));
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 omfree(r->wvhdl[j]);
93 omFreeSize((ADDRESS)r->wvhdl,i*sizeof(int *));
94 }
95 else
96 assume(r->block0 == NULL && r->block1 == NULL && r->wvhdl == NULL);
97}
void * ADDRESS
Definition: auxiliary.h:119
int j
Definition: facHensel.cc:110
#define assume(x)
Definition: mod2.h:389
#define omfree(addr)
Definition: omAllocDecl.h:237
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
#define NULL
Definition: omList.c:12
static int rBlocks(const ring r)
Definition: ring.h:568
rRingOrder_t
order stuff
Definition: ring.h:68

◆ id_Write()

void id_Write ( const ideal  I,
const ring  r 
)

◆ idShallowDelete()

static void idShallowDelete ( ideal *  h)
inlinestatic

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}
int k
Definition: cfEzgcd.cc:99
STATIC_VAR Poly * h
Definition: janet.cc:971
#define omFreeBin(addr, bin)
Definition: omAllocDecl.h:259
VAR omBin sip_sideal_bin
Definition: simpleideals.cc:27

◆ 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))
59 return _p_LeadmonomDivisibleByNoComp(a, b, r);
60 return FALSE;
61}
#define p_GetComp(p, r)
Definition: monomials.h:64
#define pIfThen1(cond, check)
Definition: monomials.h:179
#define p_LmCheckPolyRing1(p, r)
Definition: monomials.h:177
static BOOLEAN _p_LeadmonomDivisibleByNoComp(poly a, poly b, const ring r)

◆ z_Write()

void z_Write ( number  p,
ring  r 
)