source: git/kernel/syz.h @ 9c4455

spielwiese
Last change on this file since 9c4455 was 05f61f, checked in by Hans Schoenemann <hannes@…>, 12 years ago
fix: warnings
  • Property mode set to 100644
File size: 4.7 KB
Line 
1#ifndef SYZ_H
2#define SYZ_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id$ */
7/*
8* ABSTRACT: Resolutions
9*/
10#include <misc/mylimits.h>
11#include <kernel/structs.h>
12#include <polys/monomials/ring.h>
13#include <kernel/ideals.h>
14
15// Logarithm of estimate of maximal number of new components
16#define SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE 8
17// Logarithm of "distance" between a new component and prev component
18#define SYZ_SHIFT_BASE_LOG (BIT_SIZEOF_LONG - 1 - SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE)
19#define SYZ_SHIFT_BASE (((long)1) << SYZ_SHIFT_BASE_LOG)
20struct sSObject{
21                 poly  p;
22                 poly  p1,p2; /*- the pair p comes from -*/
23                 poly  lcm;   /*- the lcm of p1,p2 -*/
24                 poly  syz;   /*- the syzygy associated to p1,p2 -*/
25                 int   ind1,ind2; /*- the indeces of p1,p2 -*/
26                 poly  isNotMinimal;
27                 int   syzind;
28                 int   order;
29                 int   length;
30                 int   reference;
31               };
32typedef struct sSObject SObject;
33typedef SObject * SSet;
34typedef SSet * SRes;
35
36class ssyStrategy;
37typedef ssyStrategy * syStrategy;
38class ssyStrategy{
39  public:
40  int ** truecomponents;
41  long** ShiftedComponents;
42  int ** backcomponents;
43  int ** Howmuch;
44  int ** Firstelem;
45  int ** elemLength;
46  intvec ** weights;
47  intvec ** hilb_coeffs;
48  resolvente res;              //polynomial data for internal use only
49  resolvente orderedRes;       //polynomial data for internal use only
50  SRes resPairs;               //polynomial data for internal use only
51  intvec * Tl;
52  intvec * resolution;
53  intvec * cw;
54  intvec * betti;
55  kBucket_pt bucket;
56  kBucket_pt syz_bucket;
57  ring syRing;
58  resolvente fullres;
59  resolvente minres;
60  unsigned long ** sev;
61  int length;
62  int regularity;
63  short list_length;
64  short references;
65};
66
67void sySchreyersSyzygiesM(polyset F,int Fmax,polyset* Shdl,int* Smax,
68   BOOLEAN noSort);
69
70void sySchreyersSyzygiesB(polyset F,int Fmax,polyset* Shdl,int* Smax,
71   BOOLEAN noSort);
72
73resolvente sySchreyerResolvente(ideal arg, int maxlength, int * length,
74   BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE);
75
76syStrategy sySchreyer(ideal arg, int maxlength);
77
78resolvente syResolvente(ideal arg, int maxlength, int * length,
79                        intvec *** weights, BOOLEAN minim);
80
81syStrategy syResolution(ideal arg, int maxlength,intvec * w, BOOLEAN minim);
82
83void syMinimizeResolvente(resolvente res, int length, int first);
84
85intvec * syBetti(resolvente res,int length, int * regularity,
86         intvec* weights=NULL,BOOLEAN tomin=TRUE, int * row_shift=NULL);
87
88ideal syMinBase(ideal arg);
89
90BOOLEAN syTestOrder(ideal i);
91
92void syReOrderResolventFB(resolvente res,int length, int initial=1);
93
94resolvente syLaScala1(ideal arg,int * length);
95syStrategy syLaScala3(ideal arg,int * length);
96
97syStrategy syLaScala(ideal arg, int& maxlength, intvec* weights = NULL);
98
99syStrategy syHilb(ideal arg,int * length);
100syStrategy syKosz(ideal arg,int * length);
101
102void syKillComputation(syStrategy syzstr, ring r=currRing);
103intvec * syBettiOfComputation(syStrategy syzstr, BOOLEAN minim=TRUE,int * row_shift=NULL, intvec *weights=NULL);
104
105
106int sySize(syStrategy syzstr);
107int syDim(syStrategy syzstr);
108syStrategy syCopy(syStrategy syzstr);
109void syPrint(syStrategy syzstr,   const char *currRingName /* = currRingHdl->id */);
110
111syStrategy syMinimize(syStrategy syzstr);
112void syKillEmptyEntres(resolvente res,int length);
113
114extern int *  currcomponents;
115extern long *  currShiftedComponents;
116
117void syDeletePair(SObject * so);
118void syInitializePair(SObject * so);
119void syCopyPair(SObject * argso, SObject * imso);
120void syCompactifyPairSet(SSet sPairs, int sPlength, int first);
121void syCompactify1(SSet sPairs, int* sPlength, int first);
122SRes syInitRes(ideal arg,int * length, intvec * Tl, intvec * cw=NULL);
123void syResetShiftedComponents(syStrategy syzstr, int index,int hilb=0);
124void syEnlargeFields(syStrategy syzstr,int index);
125void syEnterPair(syStrategy syzstr, SObject * so, int * sPlength,int index);
126SSet syChosePairs(syStrategy syzstr, int *index, int *howmuch, int * actdeg);
127int syInitSyzMod(syStrategy syzstr, int index, int init=17);
128long syReorderShiftedComponents(long * sc, int n);
129void syGaussForOne(ideal arg,int gen,int ModComp,int from=-1,int till=0);
130void syEnterPair(SSet sPairs, SObject * so, int * sPlength,int index);
131void syEnterPair(syStrategy syzstr, SObject * so, int * sPlength,int index);
132syStrategy syKosz(ideal arg,int * length);
133
134resolvente syReorder(resolvente res,int length,
135        syStrategy syzstr,BOOLEAN toCopy=TRUE,resolvente totake=NULL);
136resolvente syReorder(resolvente res,int length,
137        syStrategy syzstr,BOOLEAN toCopy/*=TRUE*/,resolvente totake/*=NULL*/);
138
139#endif
Note: See TracBrowser for help on using the repository browser.