My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
Singular
dyn_modules
partialgb
partialgb.cc
Go to the documentation of this file.
1
#include "
kernel/mod2.h
"
2
#include "
polys/prCopy.h
"
3
#include "
kernel/ideals.h
"
4
#include "
kernel/GBEngine/kstd1.h
"
5
#include "
Singular/ipshell.h
"
6
#include "
Singular/mod_lib.h
"
7
#include "
Singular/ipid.h
"
8
static
ideal
idPartialGB
(ideal h1,
int
k
)
9
{
10
ideal s_h1;
11
intvec
*
w
=
NULL
;
12
13
assume
(
currRing
!=
NULL
);
14
ring orig_ring=
currRing
;
15
ring syz_ring=
rAssure_SyzComp
(orig_ring,
TRUE
);
16
rSetSyzComp
(
k
,syz_ring);
17
rChangeCurrRing
(syz_ring);
18
19
if
(orig_ring != syz_ring)
20
{
21
s_h1=
idrCopyR_NoSort
(h1,orig_ring, syz_ring);
22
}
23
else
24
{
25
s_h1 = h1;
26
}
27
28
ideal s_h3=
kStd2
(s_h1,
NULL
,
testHomog
,&
w
,(
bigintmat
*)
NULL
,
k
);
29
30
if
(s_h3==
NULL
)
31
{
32
return
idFreeModule
(
IDELEMS
(h1));
33
}
34
35
if
(orig_ring != syz_ring)
36
{
37
idDelete
(&s_h1);
38
idSkipZeroes
(s_h3);
39
rChangeCurrRing
(orig_ring);
40
s_h3 =
idrMoveR_NoSort
(s_h3, syz_ring, orig_ring);
41
rDelete
(syz_ring);
42
idTest
(s_h3);
43
return
s_h3;
44
}
45
46
idSkipZeroes
(s_h3);
47
idTest
(s_h3);
48
return
s_h3;
49
}
50
51
static
BOOLEAN
partialStd
(
leftv
res
,
leftv
h
)
52
{
53
const
short
t[]={2,
MODUL_CMD
,
INT_CMD
};
54
if
(
iiCheckTypes
(
h
,t,1))
55
{
56
ideal i1=(ideal)
h
->CopyD();
57
int
i2=(int)((
long
)
h
->next->Data());
58
res
->rtyp=
MODUL_CMD
;
59
res
->data=
idPartialGB
(i1,i2);
60
return
FALSE
;
61
}
62
return
TRUE
;
63
}
64
//------------------------------------------------------------------------
65
// initialisation of the module
66
extern
"C"
int
SI_MOD_INIT(
partialgb
)(
SModulFunctions
*
p
)
67
{
68
p
->iiAddCproc(
"partialgb.so"
,
"partialStd"
,
FALSE
,
partialStd
);
69
return
(
MAX_TOK
);
70
}
71
BOOLEAN
int BOOLEAN
Definition
auxiliary.h:88
TRUE
#define TRUE
Definition
auxiliary.h:101
FALSE
#define FALSE
Definition
auxiliary.h:97
k
int k
Definition
cfEzgcd.cc:99
p
int p
Definition
cfModGcd.cc:4086
bigintmat
Matrices of numbers.
Definition
bigintmat.h:51
intvec
Definition
intvec.h:24
res
CanonicalForm res
Definition
facAbsFact.cc:60
w
const CanonicalForm & w
Definition
facAbsFact.cc:51
MODUL_CMD
@ MODUL_CMD
Definition
grammar.cc:288
ideals.h
idDelete
#define idDelete(H)
delete an ideal
Definition
ideals.h:29
idTest
#define idTest(id)
Definition
ideals.h:47
idFreeModule
ideal idFreeModule(int i)
Definition
ideals.h:111
ipid.h
iiCheckTypes
BOOLEAN iiCheckTypes(leftv args, const short *type_list, int report)
check a list of arguemys against a given field of types return TRUE if the types match return FALSE (...
Definition
ipshell.cc:6576
ipshell.h
h
STATIC_VAR Poly * h
Definition
janet.cc:971
kStd2
ideal kStd2(ideal F, ideal Q, tHomog h, intvec **w, bigintmat *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
generic interface to GB/SB computations, large hilbert vectors
Definition
kstd1.cc:2607
kstd1.h
mod2.h
assume
#define assume(x)
Definition
mod2.h:389
mod_lib.h
NULL
#define NULL
Definition
omList.c:12
idPartialGB
static ideal idPartialGB(ideal h1, int k)
Definition
partialgb.cc:8
partialStd
static BOOLEAN partialStd(leftv res, leftv h)
Definition
partialgb.cc:51
partialgb
int SI_MOD_INIT partialgb(SModulFunctions *p)
Definition
partialgb.cc:66
rChangeCurrRing
void rChangeCurrRing(ring r)
Definition
polys.cc:16
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition
polys.cc:13
idrMoveR_NoSort
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
Definition
prCopy.cc:261
idrCopyR_NoSort
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
Definition
prCopy.cc:205
prCopy.h
rAssure_SyzComp
ring rAssure_SyzComp(const ring r, BOOLEAN complete)
Definition
ring.cc:4527
rDelete
void rDelete(ring r)
unconditionally deletes fields in r
Definition
ring.cc:454
rSetSyzComp
void rSetSyzComp(int k, const ring r)
Definition
ring.cc:5230
idSkipZeroes
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
Definition
simpleideals.cc:201
IDELEMS
#define IDELEMS(i)
Definition
simpleideals.h:23
SModulFunctions
Definition
ipid.h:69
leftv
sleftv * leftv
Definition
structs.h:53
testHomog
@ testHomog
Definition
structs.h:34
INT_CMD
@ INT_CMD
Definition
tok.h:96
MAX_TOK
@ MAX_TOK
Definition
tok.h:220
Generated on
for My Project by
doxygen 1.17.0
for
Singular