My Project  UNKNOWN_GIT_VERSION
syz.h
Go to the documentation of this file.
1 #ifndef SYZ_H
2 #define SYZ_H
3 /****************************************
4 * Computer Algebra System SINGULAR *
5 ****************************************/
6 /*
7 * ABSTRACT: Resolutions
8 */
9 #include "misc/mylimits.h"
10 #include "kernel/structs.h"
11 #include "polys/monomials/ring.h"
12 #include "kernel/ideals.h"
13 
14 // Logarithm of estimate of maximal number of new components
15 #define SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE 8
16 // Logarithm of "distance" between a new component and prev component
17 #define SYZ_SHIFT_BASE_LOG (BIT_SIZEOF_LONG - 1 - SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE)
18 #define SYZ_SHIFT_BASE (1L << SYZ_SHIFT_BASE_LOG)
19 struct sSObject{
20  poly p;
21  poly p1,p2; /*- the pair p comes from -*/
22  poly lcm; /*- the lcm of p1,p2 -*/
23  poly syz; /*- the syzygy associated to p1,p2 -*/
24  int ind1,ind2; /*- the indeces of p1,p2 -*/
26  int syzind;
27  int order;
28  int length;
29  int reference;
30  };
31 typedef struct sSObject SObject;
32 typedef SObject * SSet;
33 typedef SSet * SRes;
34 
35 class ssyStrategy;
38  public:
42  int ** Howmuch;
43  int ** Firstelem;
44  int ** elemLength;
47  resolvente res; //polynomial data for internal use only
48  resolvente orderedRes; //polynomial data for internal use only
49  SRes resPairs; //polynomial data for internal use only
56  ring syRing;
59  unsigned long ** sev;
60  int length;
62  short list_length;
63  short references;
64 };
65 
66 void sySchreyersSyzygiesM(polyset F,int Fmax,polyset* Shdl,int* Smax,
67  BOOLEAN noSort);
68 
69 void sySchreyersSyzygiesB(polyset F,int Fmax,polyset* Shdl,int* Smax,
70  BOOLEAN noSort);
71 
72 resolvente sySchreyerResolvente(ideal arg, int maxlength, int * length,
73  BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE);
74 
75 syStrategy sySchreyer(ideal arg, int maxlength);
76 
77 resolvente syResolvente(ideal arg, int maxlength, int * length,
78  intvec *** weights, BOOLEAN minim);
79 
80 syStrategy syResolution(ideal arg, int maxlength,intvec * w, BOOLEAN minim);
81 
82 void syMinimizeResolvente(resolvente res, int length, int first);
83 
84 intvec * syBetti(resolvente res,int length, int * regularity,
85  intvec* weights=NULL,BOOLEAN tomin=TRUE, int * row_shift=NULL);
86 
87 ideal syMinBase(ideal arg);
88 
89 BOOLEAN syTestOrder(ideal i);
90 
92 
93 resolvente syLaScala1(ideal arg,int * length);
94 syStrategy syLaScala3(ideal arg,int * length);
95 
96 syStrategy syLaScala(ideal arg, int& maxlength, intvec* weights = NULL);
97 
98 syStrategy syHilb(ideal arg,int * length);
99 syStrategy syKosz(ideal arg,int * length);
100 
101 // use_cache and use_tensor_trick are needed in PrymGreen.jl; do not delete!
102 syStrategy syFrank(const ideal arg, const int length, const char *method,
103  const bool use_cache = true, const bool use_tensor_trick = false);
104 
105 void syKillComputation(syStrategy syzstr, ring r=currRing);
106 intvec * syBettiOfComputation(syStrategy syzstr, BOOLEAN minim=TRUE,int * row_shift=NULL, intvec *weights=NULL);
107 
108 
109 int sySize(syStrategy syzstr);
110 int syDim(syStrategy syzstr);
112 void syPrint(syStrategy syzstr, const char *currRingName /* = currRingHdl->id */);
113 
116 
117 extern int * currcomponents;
118 extern long * currShiftedComponents;
119 
120 void syDeletePair(SObject * so);
121 void syInitializePair(SObject * so);
122 void syCopyPair(SObject * argso, SObject * imso);
123 void syCompactifyPairSet(SSet sPairs, int sPlength, int first);
124 void syCompactify1(SSet sPairs, int* sPlength, int first);
125 SRes syInitRes(ideal arg,int * length, intvec * Tl, intvec * cw=NULL);
126 void syResetShiftedComponents(syStrategy syzstr, int index,int hilb=0);
127 void syEnlargeFields(syStrategy syzstr,int index);
128 void syEnterPair(syStrategy syzstr, SObject * so, int * sPlength,int index);
129 SSet syChosePairs(syStrategy syzstr, int *index, int *howmuch, int * actdeg);
130 int syInitSyzMod(syStrategy syzstr, int index, int init=17);
131 long syReorderShiftedComponents(long * sc, int n);
132 void syGaussForOne(ideal arg,int gen,int ModComp,int from=-1,int till=0);
133 void syEnterPair(SSet sPairs, SObject * so, int * sPlength,int index);
134 void syEnterPair(syStrategy syzstr, SObject * so, int * sPlength,int index);
135 syStrategy syKosz(ideal arg,int * length);
136 
138  syStrategy syzstr,BOOLEAN toCopy=TRUE,resolvente totake=NULL);
140  syStrategy syzstr,BOOLEAN toCopy/*=TRUE*/,resolvente totake/*=NULL*/);
141 
142 #endif
syTestOrder
BOOLEAN syTestOrder(ideal i)
Definition: syz0.cc:830
FALSE
#define FALSE
Definition: auxiliary.h:94
ssyStrategy::Tl
intvec * Tl
Definition: syz.h:50
syChosePairs
SSet syChosePairs(syStrategy syzstr, int *index, int *howmuch, int *actdeg)
Definition: syz1.cc:1289
ssyStrategy::sev
unsigned long ** sev
Definition: syz.h:59
syMinimizeResolvente
void syMinimizeResolvente(resolvente res, int length, int first)
Definition: syz.cc:356
ssyStrategy::Howmuch
int ** Howmuch
Definition: syz.h:42
sSObject::ind1
int ind1
Definition: syz.h:24
polyset
poly * polyset
Definition: polys.h:254
syStrategy
ssyStrategy * syStrategy
Definition: syz.h:35
ssyStrategy::fullres
resolvente fullres
Definition: syz.h:57
syInitSyzMod
int syInitSyzMod(syStrategy syzstr, int index, int init=17)
Definition: syz1.cc:1460
sSObject::p2
poly p2
Definition: syz.h:21
length
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:263
syLaScala
syStrategy syLaScala(ideal arg, int &maxlength, intvec *weights=NULL)
Definition: syz1.cc:2560
ssyStrategy::minres
resolvente minres
Definition: syz.h:58
sSObject
Definition: syz.h:19
ssyStrategy::Firstelem
int ** Firstelem
Definition: syz.h:43
ssyStrategy::list_length
short list_length
Definition: syz.h:62
initial
poly initial(const poly p, const ring r, const gfan::ZVector &w)
Returns the initial form of p with respect to w.
Definition: initial.cc:30
syReorder
resolvente syReorder(resolvente res, int length, syStrategy syzstr, BOOLEAN toCopy=TRUE, resolvente totake=NULL)
Definition: syz1.cc:1642
sSObject::order
int order
Definition: syz.h:27
syCompactify1
void syCompactify1(SSet sPairs, int *sPlength, int first)
Definition: syz1.cc:133
ssyStrategy::resPairs
SRes resPairs
Definition: syz.h:49
sSObject::syz
poly syz
Definition: syz.h:23
syDeletePair
void syDeletePair(SObject *so)
Definition: syz1.cc:45
w
const CanonicalForm & w
Definition: facAbsFact.cc:55
syInitRes
SRes syInitRes(ideal arg, int *length, intvec *Tl, intvec *cw=NULL)
Definition: syz1.cc:294
syCopy
syStrategy syCopy(syStrategy syzstr)
Definition: syz1.cc:1885
currRing
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
ssyStrategy::references
short references
Definition: syz.h:63
ssyStrategy::regularity
int regularity
Definition: syz.h:61
sSObject::isNotMinimal
poly isNotMinimal
Definition: syz.h:25
ssyStrategy::bucket
kBucket_pt bucket
Definition: syz.h:54
TRUE
#define TRUE
Definition: auxiliary.h:98
i
int i
Definition: cfEzgcd.cc:125
res
CanonicalForm res
Definition: facAbsFact.cc:64
sSObject::p
poly p
Definition: syz.h:20
ssyStrategy::orderedRes
resolvente orderedRes
Definition: syz.h:48
ssyStrategy::truecomponents
int ** truecomponents
Definition: syz.h:39
sSObject::ind2
int ind2
Definition: syz.h:24
syDim
int syDim(syStrategy syzstr)
Definition: syz1.cc:1850
BOOLEAN
int BOOLEAN
Definition: auxiliary.h:85
syHilb
syStrategy syHilb(ideal arg, int *length)
Definition: syz2.cc:952
syCompactifyPairSet
void syCompactifyPairSet(SSet sPairs, int sPlength, int first)
Definition: syz1.cc:105
structs.h
syGaussForOne
void syGaussForOne(ideal arg, int gen, int ModComp, int from=-1, int till=0)
Definition: syz.cc:219
ssyStrategy::syRing
ring syRing
Definition: syz.h:56
syBetti
intvec * syBetti(resolvente res, int length, int *regularity, intvec *weights=NULL, BOOLEAN tomin=TRUE, int *row_shift=NULL)
Definition: syz.cc:771
resolvente
ideal * resolvente
Definition: ideals.h:18
sySchreyersSyzygiesM
void sySchreyersSyzygiesM(polyset F, int Fmax, polyset *Shdl, int *Smax, BOOLEAN noSort)
syReorderShiftedComponents
long syReorderShiftedComponents(long *sc, int n)
Definition: syz1.cc:335
syPrint
void syPrint(syStrategy syzstr, const char *currRingName)
Definition: syz1.cc:1935
intvec
Definition: intvec.h:21
ssyStrategy::length
int length
Definition: syz.h:60
syLaScala3
syStrategy syLaScala3(ideal arg, int *length)
Definition: syz1.cc:2434
ssyStrategy::resolution
intvec * resolution
Definition: syz.h:51
sySchreyer
syStrategy sySchreyer(ideal arg, int maxlength)
Definition: syz0.cc:1019
syBettiOfComputation
intvec * syBettiOfComputation(syStrategy syzstr, BOOLEAN minim=TRUE, int *row_shift=NULL, intvec *weights=NULL)
Definition: syz1.cc:1756
sSObject::reference
int reference
Definition: syz.h:29
syKosz
syStrategy syKosz(ideal arg, int *length)
Definition: syz3.cc:1764
syCopyPair
void syCopyPair(SObject *argso, SObject *imso)
Definition: syz1.cc:83
ssyStrategy::betti
intvec * betti
Definition: syz.h:53
ssyStrategy::elemLength
int ** elemLength
Definition: syz.h:44
syReOrderResolventFB
void syReOrderResolventFB(resolvente res, int length, int initial=1)
Definition: syz0.cc:741
ring.h
ssyStrategy::syz_bucket
kBucket_pt syz_bucket
Definition: syz.h:55
sSObject::p1
poly p1
Definition: syz.h:21
syResetShiftedComponents
void syResetShiftedComponents(syStrategy syzstr, int index, int hilb=0)
Definition: syz1.cc:410
syInitializePair
void syInitializePair(SObject *so)
Definition: syz1.cc:64
ssyStrategy::cw
intvec * cw
Definition: syz.h:52
sSObject::length
int length
Definition: syz.h:28
mylimits.h
currcomponents
int * currcomponents
Definition: syz1.cc:34
sSObject::lcm
poly lcm
Definition: syz.h:22
sySize
int sySize(syStrategy syzstr)
Definition: syz1.cc:1830
syFrank
syStrategy syFrank(const ideal arg, const int length, const char *method, const bool use_cache=true, const bool use_tensor_trick=false)
Definition: syz4.cc:823
SSet
SObject * SSet
Definition: syz.h:32
syMinBase
ideal syMinBase(ideal arg)
Definition: syz.cc:1005
NULL
#define NULL
Definition: omList.c:10
ssyStrategy::backcomponents
int ** backcomponents
Definition: syz.h:41
ideals.h
SRes
SSet * SRes
Definition: syz.h:33
syResolvente
resolvente syResolvente(ideal arg, int maxlength, int *length, intvec ***weights, BOOLEAN minim)
Definition: syz.cc:390
kBucket
Definition: kbuckets.h:179
syEnterPair
void syEnterPair(syStrategy syzstr, SObject *so, int *sPlength, int index)
Definition: syz1.cc:1036
ssyStrategy::hilb_coeffs
intvec ** hilb_coeffs
Definition: syz.h:46
sySchreyerResolvente
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE)
Definition: syz0.cc:856
ssyStrategy::res
resolvente res
Definition: syz.h:47
ssyStrategy::ShiftedComponents
long ** ShiftedComponents
Definition: syz.h:40
syEnlargeFields
void syEnlargeFields(syStrategy syzstr, int index)
Definition: syz1.cc:735
index
static int index(p_Length length, p_Ord ord)
Definition: p_Procs_Impl.h:592
sSObject::syzind
int syzind
Definition: syz.h:26
ssyStrategy::weights
intvec ** weights
Definition: syz.h:45
currShiftedComponents
long * currShiftedComponents
Definition: syz1.cc:35
syKillComputation
void syKillComputation(syStrategy syzstr, ring r=currRing)
Definition: syz1.cc:1496
syLaScala1
resolvente syLaScala1(ideal arg, int *length)
syKillEmptyEntres
void syKillEmptyEntres(resolvente res, int length)
Definition: syz1.cc:2201
ssyStrategy
Definition: syz.h:37
syResolution
syStrategy syResolution(ideal arg, int maxlength, intvec *w, BOOLEAN minim)
Definition: syz.cc:614
syMinimize
syStrategy syMinimize(syStrategy syzstr)
Definition: syz1.cc:2395
sySchreyersSyzygiesB
void sySchreyersSyzygiesB(polyset F, int Fmax, polyset *Shdl, int *Smax, BOOLEAN noSort)