My Project
Loading...
Searching...
No Matches
kernel
fglm
fglm.h
Go to the documentation of this file.
1
// emacs edit mode for this file is -*- C++ -*-
2
3
/****************************************
4
* Computer Algebra System SINGULAR *
5
****************************************/
6
/*
7
* ABSTRACT - The FGLM-Algorithm
8
* The main header file for the fglm algorithm
9
* (See fglm.cc for details)
10
*/
11
12
#ifndef FGLM_H
13
#define FGLM_H
14
15
#include "
kernel/polys.h
"
16
#include "
kernel/structs.h
"
17
#include "
kernel/fglm/fglmvec.h
"
18
19
#define PROT(msg)
20
#define STICKYPROT(msg) if (BTEST1(OPT_PROT)) Print(msg)
21
#define PROT2(msg,arg)
22
#define STICKYPROT2(msg,arg) if (BTEST1(OPT_PROT)) Print(msg,arg)
23
#define fglmASSERT(ignore1,ignore2)
24
25
// internal Version: 1.10.1.4
26
// Some data types needed by the fglm algorithm. claptmpl.cc has to know them.
27
class
fglmSelem
28
{
29
public
:
30
int
*
divisors
;
31
poly
monom
;
32
int
numVars
;
33
fglmSelem
( poly
p
,
int
var );
34
35
void
cleanup
();
36
BOOLEAN
isBasisOrEdge
()
const
{
return
( (
divisors
[0] ==
numVars
) ?
TRUE
:
FALSE
); }
37
void
newDivisor
(
int
var ) {
divisors
[ ++
divisors
[0] ]= var; }
38
//#ifndef NOSTREAMIO
39
//friend OSTREAM & operator <<(OSTREAM &, fglmSelem);
40
//#endif
41
};
42
//#ifndef NOSTREAMIO
43
//inline OSTREAM & operator <<(OSTREAM & os, fglmSelem) { return os;};
44
//#endif
45
46
class
fglmDelem
47
{
48
public
:
49
poly
monom
;
50
fglmVector
v
;
51
int
insertions
;
52
int
var
;
53
fglmDelem
( poly &
m
,
fglmVector
mv
,
int
v
);
54
55
void
cleanup
();
56
BOOLEAN
isBasisOrEdge
()
const
{
return
( (
insertions
== 0) ?
TRUE
:
FALSE
); }
57
void
newDivisor
() {
insertions
--; }
58
//#ifndef NOSTREAMIO
59
//friend OSTREAM & operator <<(OSTREAM &, fglmDelem);
60
//#endif
61
};
62
//#ifndef NOSTREAMIO
63
//inline OSTREAM & operator <<(OSTREAM & os, fglmDelem) { return os;};
64
//#endif
65
66
// fglmzero(...):
67
// The fglm algorithm for 0-dimensional ideals. ( fglmzero is defined in fglmzero.cc )
68
// Calculates the reduced groebner basis of sourceIdeal in destRing.
69
// The sourceIdeal has to be a reduced, 0-dimensional groebner basis in sourceRing.
70
// Warning: There is no check, if the ideal is really 0-dimensional and minimal.
71
// If it is minimal but not reduced, then it returns FALSE, otherwise TRUE.
72
// Warning: There is no check, if the rings are compatible for fglm (see
73
// fglm.cc for functions to check this)
74
// if switchBack==TRUE, then the procedure sets the ring as currentRing which was
75
// current when it was called ( When called there may be currRing != sourceRing ).
76
// if switchBack==FALSE, then currRing==destRing at the end.
77
// if deleteIdeal==TRUE then sourceIdeal is deleted (in any case, even if the
78
// procedure fails)
79
// if deleteIdeal==FALSE, then nothing happens to sourceIdeal
80
BOOLEAN
81
fglmzero
(
ring
sourceRing,
ideal
&
sourceIdeal
,
ring
destRing
,
ideal
&
destideal
,
BOOLEAN
switchBack
=
TRUE
,
BOOLEAN
deleteIdeal =
FALSE
);
82
83
BOOLEAN
fglmquot
(
ideal
sourceIdeal
, poly
quot
,
ideal
&
destIdeal
);
84
85
poly
fglmLinearCombination
(
ideal
source
, poly
monset
);
86
poly
fglmNewLinearCombination
(
ideal
source
, poly
monset
);
87
#endif
BOOLEAN
int BOOLEAN
Definition
auxiliary.h:88
TRUE
#define TRUE
Definition
auxiliary.h:101
FALSE
#define FALSE
Definition
auxiliary.h:97
m
int m
Definition
cfEzgcd.cc:128
p
int p
Definition
cfModGcd.cc:4086
List
Definition
ftmpl_list.h:52
fglmDelem
Definition
fglm.h:47
fglmDelem::insertions
int insertions
Definition
fglm.h:51
fglmDelem::v
fglmVector v
Definition
fglm.h:50
fglmDelem::monom
poly monom
Definition
fglm.h:49
fglmDelem::var
int var
Definition
fglm.h:52
fglmDelem::cleanup
void cleanup()
Definition
fglmzero.cc:713
fglmDelem::newDivisor
void newDivisor()
Definition
fglm.h:57
fglmDelem::isBasisOrEdge
BOOLEAN isBasisOrEdge() const
Definition
fglm.h:56
fglmSelem
Definition
fglm.h:28
fglmSelem::monom
poly monom
Definition
fglm.h:31
fglmSelem::cleanup
void cleanup()
Definition
fglmzero.cc:330
fglmSelem::divisors
int * divisors
Definition
fglm.h:30
fglmSelem::numVars
int numVars
Definition
fglm.h:32
fglmSelem::newDivisor
void newDivisor(int var)
Definition
fglm.h:37
fglmSelem::isBasisOrEdge
BOOLEAN isBasisOrEdge() const
Definition
fglm.h:36
fglmVector
Definition
fglmvec.h:19
fglmvec.h
fglmLinearCombination
poly fglmLinearCombination(ideal source, poly monset)
Definition
fglmcomb.cc:415
fglmzero
BOOLEAN fglmzero(ring sourceRing, ideal &sourceIdeal, ring destRing, ideal &destideal, BOOLEAN switchBack=TRUE, BOOLEAN deleteIdeal=FALSE)
Definition
fglmzero.cc:1193
fglmquot
BOOLEAN fglmquot(ideal sourceIdeal, poly quot, ideal &destIdeal)
Definition
fglmzero.cc:1218
fglmNewLinearCombination
poly fglmNewLinearCombination(ideal source, poly monset)
Definition
fglmcomb.cc:153
polys.h
Compatibility layer for legacy polynomial operations (over currRing)
structs.h
Generated on Tue Oct 1 2024 10:27:35 for My Project by
doxygen 1.9.8
for
Singular