My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
Singular
dyn_modules
gfanlib
singularWishlist.h
Go to the documentation of this file.
1
#ifndef SINGULARWISHLIST_H
2
#define SINGULARWISHLIST_H
3
4
#include "
polys/monomials/p_polys.h
"
5
#include "
libpolys/polys/simpleideals.h
"
6
7
static
inline
BOOLEAN
_p_LeadmonomDivisibleByNoComp
(poly a, poly
b
,
const
ring r)
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
{
23
pDivAssume
(
p_DebugLmDivisibleByNoComp
(a,
b
, r) ==
FALSE
);
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
{
39
pDivAssume
(
p_DebugLmDivisibleByNoComp
(a,
b
, r) ==
FALSE
);
40
return
FALSE
;
41
}
42
i
--;
43
}
44
while
(
i
>=0);
45
}
46
pDivAssume
(
p_DebugLmDivisibleByNoComp
(a,
b
, r) ==
TRUE
);
47
return
TRUE
;
48
}
49
50
/**
51
* p_LmDivisibleBy checks also the divisibility of coefficients
52
**/
53
static
inline
BOOLEAN
p_LeadmonomDivisibleBy
(poly a, poly
b
,
const
ring r)
54
{
55
p_LmCheckPolyRing1
(
b
, r);
56
57
pIfThen1
(a !=
NULL
,
p_LmCheckPolyRing1
(
b
, r));
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
}
62
63
/**
64
* id_ShallowDelete deletes the monomials of the polynomials stored inside of it
65
**/
66
static
inline
void
idShallowDelete
(ideal *
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
);
74
omFreeBin
((
ADDRESS
)*
h
,
sip_sideal_bin
);
75
*
h
=
NULL
;
76
}
77
return
;
78
}
79
80
static
inline
void
deleteOrdering
(ring r)
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
}
98
99
100
void
z_Write
(number
p
, ring r);
101
void
id_Write
(
const
ideal I,
const
ring r);
102
103
104
#endif
BOOLEAN
int BOOLEAN
Definition
auxiliary.h:88
TRUE
#define TRUE
Definition
auxiliary.h:101
FALSE
#define FALSE
Definition
auxiliary.h:97
ADDRESS
void * ADDRESS
Definition
auxiliary.h:120
i
int i
Definition
cfEzgcd.cc:132
k
int k
Definition
cfEzgcd.cc:99
p
int p
Definition
cfModGcd.cc:4086
b
CanonicalForm b
Definition
cfModGcd.cc:4111
j
int j
Definition
facHensel.cc:110
h
STATIC_VAR Poly * h
Definition
janet.cc:971
assume
#define assume(x)
Definition
mod2.h:389
p_GetComp
#define p_GetComp(p, r)
Definition
monomials.h:64
pIfThen1
#define pIfThen1(cond, check)
Definition
monomials.h:179
p_LmCheckPolyRing1
#define p_LmCheckPolyRing1(p, r)
Definition
monomials.h:177
omfree
#define omfree(addr)
Definition
omAllocDecl.h:237
omFreeSize
#define omFreeSize(addr, size)
Definition
omAllocDecl.h:260
omFreeBin
#define omFreeBin(addr, bin)
Definition
omAllocDecl.h:259
NULL
#define NULL
Definition
omList.c:12
p_DebugLmDivisibleByNoComp
BOOLEAN p_DebugLmDivisibleByNoComp(poly a, poly b, ring r)
Definition
pDebug.cc:144
p_polys.h
pDivAssume
#define pDivAssume(x)
Definition
p_polys.h:1303
rBlocks
static int rBlocks(const ring r)
Definition
ring.h:579
rRingOrder_t
rRingOrder_t
order stuff
Definition
ring.h:69
sip_sideal_bin
VAR omBin sip_sideal_bin
Definition
simpleideals.cc:27
simpleideals.h
_p_LeadmonomDivisibleByNoComp
static BOOLEAN _p_LeadmonomDivisibleByNoComp(poly a, poly b, const ring r)
Definition
singularWishlist.h:7
idShallowDelete
static void idShallowDelete(ideal *h)
id_ShallowDelete deletes the monomials of the polynomials stored inside of it
Definition
singularWishlist.h:66
id_Write
void id_Write(const ideal I, const ring r)
deleteOrdering
static void deleteOrdering(ring r)
Definition
singularWishlist.h:80
z_Write
void z_Write(number p, ring r)
p_LeadmonomDivisibleBy
static BOOLEAN p_LeadmonomDivisibleBy(poly a, poly b, const ring r)
p_LmDivisibleBy checks also the divisibility of coefficients
Definition
singularWishlist.h:53
Generated on
for My Project by
doxygen 1.17.0
for
Singular