My Project
Loading...
Searching...
No Matches
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"
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)
19struct 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 indices of p1,p2 -*/
26 int syzind;
27 int order;
28 int length;
30 };
31typedef struct sSObject SObject;
32typedef SObject * SSet;
33typedef SSet * SRes;
34
35class 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;
64};
65
66void sySchreyersSyzygiesM(polyset F,int Fmax,polyset* Shdl,int* Smax,
67 BOOLEAN noSort);
68
69void sySchreyersSyzygiesB(polyset F,int Fmax,polyset* Shdl,int* Smax,
70 BOOLEAN noSort);
71
72resolvente sySchreyerResolvente(ideal arg, int maxlength, int * length,
73 BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE);
74
75syStrategy sySchreyer(ideal arg, int maxlength);
76
77resolvente syResolvente(ideal arg, int maxlength, int * length,
78 intvec *** weights, BOOLEAN minim);
79
80syStrategy syResolution(ideal arg, int maxlength,intvec * w, BOOLEAN minim);
81
82void syMinimizeResolvente(resolvente res, int length, int first);
83
84intvec * syBetti(resolvente res,int length, int * regularity,
85 intvec* weights=NULL,BOOLEAN tomin=TRUE, int * row_shift=NULL);
86
87ideal syMinBase(ideal arg);
88
89BOOLEAN syTestOrder(ideal i);
90
92
93resolvente syLaScala1(ideal arg,int * length);
94syStrategy syLaScala3(ideal arg,int * length);
95
96syStrategy syLaScala(ideal arg, int& maxlength, intvec* weights = NULL);
97
98syStrategy syHilb(ideal arg,int * length);
99syStrategy syKosz(ideal arg,int * length);
100
101// use_cache and use_tensor_trick are needed in PrymGreen.jl; do not delete!
102syStrategy syFrank(const ideal arg, const int length, const char *method,
103 const bool use_cache = true, const bool use_tensor_trick = false);
104
105void syKillComputation(syStrategy syzstr, ring r=currRing);
106intvec * syBettiOfComputation(syStrategy syzstr, BOOLEAN minim=TRUE,int * row_shift=NULL, intvec *weights=NULL);
107
108
109int sySize(syStrategy syzstr);
110int syDim(syStrategy syzstr);
112void syPrint(syStrategy syzstr, const char *currRingName /* = currRingHdl->id */);
113
116
119
120void syDeletePair(SObject * so);
121void syInitializePair(SObject * so);
122void syCopyPair(SObject * argso, SObject * imso);
123void syCompactifyPairSet(SSet sPairs, int sPlength, int first);
124void syCompactify1(SSet sPairs, int* sPlength, int first);
125SRes syInitRes(ideal arg,int * length, intvec * Tl, intvec * cw=NULL);
126void syResetShiftedComponents(syStrategy syzstr, int index,int hilb=0);
127void syEnlargeFields(syStrategy syzstr,int index);
128void syEnterPair(syStrategy syzstr, SObject * so, int * sPlength,int index);
129SSet syChosePairs(syStrategy syzstr, int *index, int *howmuch, int * actdeg);
130int syInitSyzMod(syStrategy syzstr, int index, int init=17);
131long syReorderShiftedComponents(long * sc, int n);
132void syGaussForOne(ideal arg,int gen,int ModComp,int from=-1,int till=0);
133void syEnterPair(SSet sPairs, SObject * so, int * sPlength,int index);
134void syEnterPair(syStrategy syzstr, SObject * so, int * sPlength,int index);
135syStrategy 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
int BOOLEAN
Definition: auxiliary.h:87
#define TRUE
Definition: auxiliary.h:100
#define FALSE
Definition: auxiliary.h:96
int i
Definition: cfEzgcd.cc:132
Definition: intvec.h:23
CanonicalForm res
Definition: facAbsFact.cc:60
const CanonicalForm & w
Definition: facAbsFact.cc:51
#define EXTERN_VAR
Definition: globaldefs.h:6
ideal * resolvente
Definition: ideals.h:18
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
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:257
#define NULL
Definition: omList.c:12
static int index(p_Length length, p_Ord ord)
Definition: p_Procs_Impl.h:592
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
poly * polyset
Definition: polys.h:259
poly isNotMinimal
Definition: syz.h:25
void syCopyPair(SObject *argso, SObject *imso)
Definition: syz1.cc:82
resolvente syResolvente(ideal arg, int maxlength, int *length, intvec ***weights, BOOLEAN minim)
Definition: syz.cc:389
syStrategy syHilb(ideal arg, int *length)
Definition: syz2.cc:950
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE)
Definition: syz0.cc:855
syStrategy sySchreyer(ideal arg, int maxlength)
Definition: syz0.cc:1018
ring syRing
Definition: syz.h:56
intvec ** hilb_coeffs
Definition: syz.h:46
int syzind
Definition: syz.h:26
int syDim(syStrategy syzstr)
Definition: syz1.cc:1849
syStrategy syMinimize(syStrategy syzstr)
Definition: syz1.cc:2392
syStrategy syCopy(syStrategy syzstr)
Definition: syz1.cc:1884
poly p1
Definition: syz.h:21
resolvente minres
Definition: syz.h:58
intvec * betti
Definition: syz.h:53
syStrategy syResolution(ideal arg, int maxlength, intvec *w, BOOLEAN minim)
Definition: syz.cc:613
syStrategy syKosz(ideal arg, int *length)
Definition: syz3.cc:1766
void syKillComputation(syStrategy syzstr, ring r=currRing)
Definition: syz1.cc:1495
void sySchreyersSyzygiesM(polyset F, int Fmax, polyset *Shdl, int *Smax, BOOLEAN noSort)
resolvente syReorder(resolvente res, int length, syStrategy syzstr, BOOLEAN toCopy=TRUE, resolvente totake=NULL)
Definition: syz1.cc:1641
intvec * syBettiOfComputation(syStrategy syzstr, BOOLEAN minim=TRUE, int *row_shift=NULL, intvec *weights=NULL)
Definition: syz1.cc:1755
void syCompactifyPairSet(SSet sPairs, int sPlength, int first)
Definition: syz1.cc:104
SRes syInitRes(ideal arg, int *length, intvec *Tl, intvec *cw=NULL)
Definition: syz1.cc:293
EXTERN_VAR long * currShiftedComponents
Definition: syz.h:118
resolvente syLaScala1(ideal arg, int *length)
int sySize(syStrategy syzstr)
Definition: syz1.cc:1829
short references
Definition: syz.h:63
kBucket_pt syz_bucket
Definition: syz.h:55
void syCompactify1(SSet sPairs, int *sPlength, int first)
Definition: syz1.cc:132
syStrategy syLaScala(ideal arg, int &maxlength, intvec *weights=NULL)
Definition: syz1.cc:2557
EXTERN_VAR int * currcomponents
Definition: syz.h:117
void syResetShiftedComponents(syStrategy syzstr, int index, int hilb=0)
Definition: syz1.cc:409
void syKillEmptyEntres(resolvente res, int length)
Definition: syz1.cc:2198
poly lcm
Definition: syz.h:22
intvec * cw
Definition: syz.h:52
poly p2
Definition: syz.h:21
short list_length
Definition: syz.h:62
int reference
Definition: syz.h:29
resolvente res
Definition: syz.h:47
int ** backcomponents
Definition: syz.h:41
void syEnlargeFields(syStrategy syzstr, int index)
Definition: syz1.cc:734
resolvente fullres
Definition: syz.h:57
intvec ** weights
Definition: syz.h:45
poly p
Definition: syz.h:20
intvec * Tl
Definition: syz.h:50
ssyStrategy * syStrategy
Definition: syz.h:36
resolvente orderedRes
Definition: syz.h:48
intvec * resolution
Definition: syz.h:51
void sySchreyersSyzygiesB(polyset F, int Fmax, polyset *Shdl, int *Smax, BOOLEAN noSort)
int order
Definition: syz.h:27
int ** truecomponents
Definition: syz.h:39
void syEnterPair(syStrategy syzstr, SObject *so, int *sPlength, int index)
Definition: syz1.cc:1035
ideal syMinBase(ideal arg)
Definition: syz.cc:1004
void syInitializePair(SObject *so)
Definition: syz1.cc:63
int length
Definition: syz.h:60
void syReOrderResolventFB(resolvente res, int length, int initial=1)
Definition: syz0.cc:740
int ** Firstelem
Definition: syz.h:43
int ** elemLength
Definition: syz.h:44
long syReorderShiftedComponents(long *sc, int n)
Definition: syz1.cc:334
int regularity
Definition: syz.h:61
unsigned long ** sev
Definition: syz.h:59
BOOLEAN syTestOrder(ideal i)
Definition: syz0.cc:829
SRes resPairs
Definition: syz.h:49
kBucket_pt bucket
Definition: syz.h:54
SSet * SRes
Definition: syz.h:33
intvec * syBetti(resolvente res, int length, int *regularity, intvec *weights=NULL, BOOLEAN tomin=TRUE, int *row_shift=NULL)
Definition: syz.cc:770
int ind2
Definition: syz.h:24
void syPrint(syStrategy syzstr, const char *currRingName)
Definition: syz1.cc:1934
SSet syChosePairs(syStrategy syzstr, int *index, int *howmuch, int *actdeg)
Definition: syz1.cc:1288
void syGaussForOne(ideal arg, int gen, int ModComp, int from=-1, int till=0)
Definition: syz.cc:218
long ** ShiftedComponents
Definition: syz.h:40
int length
Definition: syz.h:28
void syDeletePair(SObject *so)
Definition: syz1.cc:44
poly syz
Definition: syz.h:23
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:792
SObject * SSet
Definition: syz.h:32
int ind1
Definition: syz.h:24
void syMinimizeResolvente(resolvente res, int length, int first)
Definition: syz.cc:355
int ** Howmuch
Definition: syz.h:42
syStrategy syLaScala3(ideal arg, int *length)
Definition: syz1.cc:2431
int syInitSyzMod(syStrategy syzstr, int index, int init=17)
Definition: syz1.cc:1459
Definition: syz.h:19