[0e1846] | 1 | #ifndef SYZ_H |
---|
[a9a7be] | 2 | #define SYZ_H |
---|
[0e1846] | 3 | /**************************************** |
---|
| 4 | * Computer Algebra System SINGULAR * |
---|
| 5 | ****************************************/ |
---|
[4e6cf2] | 6 | /* $Id: syz.h,v 1.28 2000-10-30 13:40:28 obachman Exp $ */ |
---|
[0e1846] | 7 | /* |
---|
[dfc6b54] | 8 | * ABSTRACT: Resolutions |
---|
[0e1846] | 9 | */ |
---|
| 10 | #include "structs.h" |
---|
| 11 | |
---|
[c1489f2] | 12 | // Logarithm of estimate of maximal number of new components |
---|
| 13 | #define SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE 8 |
---|
| 14 | // Logarithm of "distance" between a new component and prev component |
---|
| 15 | #define SYZ_SHIFT_BASE_LOG (BIT_SIZEOF_LONG - 1 - SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE) |
---|
[4e6cf2] | 16 | #define SYZ_SHIFT_BASE (((long)1) << SYZ_SHIFT_BASE_LOG) |
---|
[66415e1] | 17 | struct sSObject{ |
---|
| 18 | poly p; |
---|
| 19 | poly p1,p2; /*- the pair p comes from -*/ |
---|
| 20 | poly lcm; /*- the lcm of p1,p2 -*/ |
---|
| 21 | poly syz; /*- the syzygy associated to p1,p2 -*/ |
---|
| 22 | int ind1,ind2; /*- the indeces of p1,p2 -*/ |
---|
[dfc6b54] | 23 | poly isNotMinimal; |
---|
| 24 | int syzind; |
---|
| 25 | int order; |
---|
[a9a7be] | 26 | int length; |
---|
| 27 | int reference; |
---|
[66415e1] | 28 | }; |
---|
| 29 | typedef struct sSObject SObject; |
---|
| 30 | typedef SObject * SSet; |
---|
| 31 | typedef SSet * SRes; |
---|
| 32 | |
---|
[dfc6b54] | 33 | class ssyStrategy; |
---|
| 34 | typedef ssyStrategy * syStrategy; |
---|
| 35 | class ssyStrategy{ |
---|
| 36 | public: |
---|
| 37 | int ** truecomponents; |
---|
[a9a7be] | 38 | long** ShiftedComponents; |
---|
[dfc6b54] | 39 | int ** backcomponents; |
---|
| 40 | int ** Howmuch; |
---|
| 41 | int ** Firstelem; |
---|
[a9a7be] | 42 | int ** elemLength; |
---|
[25003c] | 43 | intvec ** weights; |
---|
[a9a7be] | 44 | intvec ** hilb_coeffs; |
---|
| 45 | resolvente res; //polynomial data for internal use only |
---|
| 46 | resolvente orderedRes; //polynomial data for internal use only |
---|
| 47 | SRes resPairs; //polynomial data for internal use only |
---|
[dfc6b54] | 48 | intvec * Tl; |
---|
| 49 | intvec * resolution; |
---|
[7a30b9] | 50 | intvec * cw; |
---|
[c1489f2] | 51 | intvec * betti; |
---|
[a9a7be] | 52 | kBucket_pt bucket; |
---|
| 53 | kBucket_pt syz_bucket; |
---|
| 54 | ring syRing; |
---|
| 55 | resolvente fullres; |
---|
| 56 | resolvente minres; |
---|
[e1b9f91] | 57 | unsigned long ** sev; |
---|
| 58 | int length; |
---|
[0da971] | 59 | int regularity; |
---|
[e1b9f91] | 60 | short list_length; |
---|
| 61 | short references; |
---|
[dfc6b54] | 62 | }; |
---|
| 63 | |
---|
[0e1846] | 64 | void sySchreyersSyzygiesM(polyset F,int Fmax,polyset* Shdl,int* Smax, |
---|
| 65 | BOOLEAN noSort); |
---|
| 66 | |
---|
| 67 | void sySchreyersSyzygiesB(polyset F,int Fmax,polyset* Shdl,int* Smax, |
---|
| 68 | BOOLEAN noSort); |
---|
| 69 | |
---|
| 70 | resolvente sySchreyerResolvente(ideal arg, int maxlength, int * length, |
---|
[66415e1] | 71 | BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE); |
---|
[0e1846] | 72 | |
---|
[25003c] | 73 | syStrategy sySchreyer(ideal arg, int maxlength); |
---|
| 74 | |
---|
[0e1846] | 75 | resolvente syResolvente(ideal arg, int maxlength, int * length, |
---|
| 76 | intvec *** weights, BOOLEAN minim); |
---|
| 77 | |
---|
[25003c] | 78 | syStrategy syResolution(ideal arg, int maxlength,intvec * w, BOOLEAN minim); |
---|
| 79 | |
---|
[0e1846] | 80 | void syMinimizeResolvente(resolvente res, int length, int first); |
---|
| 81 | |
---|
| 82 | intvec * syBetti(resolvente res,int length, int * regularity, |
---|
[ba774b] | 83 | intvec* weights=NULL,BOOLEAN tomin=TRUE, int * row_shift=NULL); |
---|
[0e1846] | 84 | |
---|
| 85 | ideal syMinBase(ideal arg); |
---|
| 86 | |
---|
| 87 | BOOLEAN syTestOrder(ideal i); |
---|
| 88 | |
---|
[66415e1] | 89 | void syReOrderResolventFB(resolvente res,int length, int initial=1); |
---|
| 90 | |
---|
| 91 | resolvente syLaScala1(ideal arg,int * length); |
---|
[dfc6b54] | 92 | syStrategy syLaScala3(ideal arg,int * length); |
---|
[a9a7be] | 93 | syStrategy syHilb(ideal arg,int * length); |
---|
| 94 | syStrategy syKosz(ideal arg,int * length); |
---|
[66415e1] | 95 | |
---|
[a9a7be] | 96 | void syDeleteRes(resolvente * res,int length); |
---|
[dfc6b54] | 97 | void syKillComputation(syStrategy syzstr); |
---|
[ba774b] | 98 | intvec * syBettiOfComputation(syStrategy syzstr, BOOLEAN minim=TRUE,int * row_shift=NULL); |
---|
[1b9882] | 99 | BOOLEAN syBetti1(leftv res, leftv u); |
---|
| 100 | BOOLEAN syBetti2(leftv res, leftv u, leftv w); |
---|
[dfc6b54] | 101 | int syLength(syStrategy syzstr); |
---|
| 102 | int sySize(syStrategy syzstr); |
---|
| 103 | int syDim(syStrategy syzstr); |
---|
| 104 | syStrategy syCopy(syStrategy syzstr); |
---|
| 105 | void syPrint(syStrategy syzstr); |
---|
[b982ef] | 106 | lists syConvRes(syStrategy syzstr,BOOLEAN toDel=FALSE); |
---|
| 107 | syStrategy syConvList(lists li,BOOLEAN toDel=FALSE); |
---|
[dfc6b54] | 108 | syStrategy syForceMin(lists li); |
---|
| 109 | syStrategy syMinimize(syStrategy syzstr); |
---|
[7ae776] | 110 | void syKillEmptyEntres(resolvente res,int length); |
---|
[8c8bea] | 111 | |
---|
[a9a7be] | 112 | extern int * currcomponents; |
---|
| 113 | extern long * currShiftedComponents; |
---|
| 114 | |
---|
[c1489f2] | 115 | int syzcomp1dpc(poly p1, poly p2); |
---|
| 116 | void syDeletePair(SObject * so); |
---|
| 117 | void syInitializePair(SObject * so); |
---|
| 118 | void syCopyPair(SObject * argso, SObject * imso); |
---|
| 119 | void syCompactifyPairSet(SSet sPairs, int sPlength, int first); |
---|
| 120 | void syCompactify1(SSet sPairs, int* sPlength, int first); |
---|
| 121 | SRes syInitRes(ideal arg,int * length, intvec * Tl, intvec * cw=NULL); |
---|
| 122 | void syResetShiftedComponents(syStrategy syzstr, int index,int hilb=0); |
---|
| 123 | void syEnlargeFields(syStrategy syzstr,int index); |
---|
| 124 | void syEnterPair(syStrategy syzstr, SObject * so, int * sPlength,int index); |
---|
| 125 | SSet syChosePairs(syStrategy syzstr, int *index, int *howmuch, int * actdeg); |
---|
| 126 | int syInitSyzMod(syStrategy syzstr, int index, int init=17); |
---|
| 127 | long syReorderShiftedComponents(long * sc, int n); |
---|
[416465] | 128 | void syGaussForOne(ideal arg,int gen,int ModComp,int from=-1,int till=0); |
---|
[dad52a] | 129 | void syEnterPair(SSet sPairs, SObject * so, int * sPlength,int index); |
---|
| 130 | void syEnterPair(syStrategy syzstr, SObject * so, int * sPlength,int index); |
---|
| 131 | syStrategy syKosz(ideal arg,int * length); |
---|
[c1489f2] | 132 | |
---|
[0e1846] | 133 | #endif |
---|