My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
Singular
dyn_modules
loctriv
loctriv.cc
Go to the documentation of this file.
1
/*
2
*
3
*
4
* Module file for computing locally trivial vector fields
5
* by a Groebner basis computation similar to the syzygies
6
*
7
*/
8
#include "
kernel/ideals.h
"
9
#include "
libpolys/polys/monomials/ring.h
"
10
#include "
kernel/GBEngine/kstd1.h
"
11
#include "
libpolys/polys/prCopy.h
"
12
#include "
Singular/tok.h
"
13
#include "
Singular/ipshell.h
"
14
#include "
Singular/mod_lib.h
"
15
#include "
Singular/ipid.h
"
16
17
static
BOOLEAN
kstd
(
leftv
res
,
leftv
args)
18
{
19
const
short
t1[]={2,
MODUL_CMD
,
INT_CMD
};
20
if
(
iiCheckTypes
(args,t1,1))
21
{
22
ideal h1=(ideal)args->
CopyD
();
23
int
k
=(int)(
long
)args->
next
->
Data
();
24
ideal s_h1;
25
ideal s_h3;
26
ring orig_ring;
27
ring syz_ring;
28
intvec
*
w
=
NULL
;
29
30
assume
(
currRing
!=
NULL
);
31
orig_ring=
currRing
;
32
syz_ring=
rAssure_SyzComp
(orig_ring);
33
rSetSyzComp
(
k
,syz_ring);
34
rChangeCurrRing
(syz_ring);
35
36
if
(orig_ring != syz_ring)
37
{
38
s_h1=
idrCopyR_NoSort
(h1,orig_ring,syz_ring);
39
}
40
else
41
{
42
s_h1 = h1;
43
}
44
45
s_h3=
kStd2
(s_h1,
NULL
,
testHomog
,&
w
,(
bigintmat
*)
NULL
,
k
);
46
47
if
(orig_ring != syz_ring)
48
{
49
idDelete
(&s_h1);
50
idSkipZeroes
(s_h3);
51
rChangeCurrRing
(orig_ring);
52
s_h3 =
idrMoveR_NoSort
(s_h3, syz_ring, orig_ring);
53
rKill
(syz_ring);
54
}
55
else
56
{
57
idSkipZeroes
(s_h3);
58
}
59
res
->data=(
void
*)s_h3;
60
res
->rtyp=
MODUL_CMD
;
61
return
FALSE
;
62
}
63
else
64
return
TRUE
;
65
}
66
67
//------------------------------------------------------------------------
68
// initialisation of the module
69
extern
"C"
int
SI_MOD_INIT(
loctriv
)(
SModulFunctions
*
p
)
70
{
71
p
->iiAddCproc(
"loctriv.so"
,
"kstd"
,
FALSE
,
kstd
);
72
return
(
MAX_TOK
);
73
}
74
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
sleftv::CopyD
void * CopyD(int t)
Definition
subexpr.cc:714
sleftv::Data
void * Data()
Definition
subexpr.cc:1192
sleftv::next
leftv next
Definition
subexpr.h:86
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
ipid.h
rKill
void rKill(ring r)
Definition
ipshell.cc:6181
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
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
kstd
static BOOLEAN kstd(leftv res, leftv args)
Definition
loctriv.cc:17
loctriv
int SI_MOD_INIT loctriv(SModulFunctions *p)
Definition
loctriv.cc:69
assume
#define assume(x)
Definition
mod2.h:389
mod_lib.h
NULL
#define NULL
Definition
omList.c:12
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
rSetSyzComp
void rSetSyzComp(int k, const ring r)
Definition
ring.cc:5230
ring.h
idSkipZeroes
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
Definition
simpleideals.cc:201
SModulFunctions
Definition
ipid.h:69
leftv
sleftv * leftv
Definition
structs.h:53
testHomog
@ testHomog
Definition
structs.h:34
tok.h
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