source: git/kernel/syz.h @ 06662e

spielwiese
Last change on this file since 06662e was b07ba77, checked in by Hans Schönemann <hannes@…>, 14 years ago
clean up structs.h, part ... git-svn-id: file:///usr/local/Singular/svn/trunk@12437 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 5.0 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 "structs.h"
11#include "ring.h"
12#include "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 (((long)1) << 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 indeces of p1,p2 -*/
25                 poly  isNotMinimal;
26                 int   syzind;
27                 int   order;
28                 int   length;
29                 int   reference;
30               };
31typedef struct sSObject SObject;
32typedef SObject * SSet;
33typedef SSet * SRes;
34
35class ssyStrategy;
36typedef ssyStrategy * syStrategy;
37class ssyStrategy{
38  public:
39  int ** truecomponents;
40  long** ShiftedComponents;
41  int ** backcomponents;
42  int ** Howmuch;
43  int ** Firstelem;
44  int ** elemLength;
45  intvec ** weights;
46  intvec ** hilb_coeffs;
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
50  intvec * Tl;
51  intvec * resolution;
52  intvec * cw;
53  intvec * betti;
54  kBucket_pt bucket;
55  kBucket_pt syz_bucket;
56  ring syRing;
57  resolvente fullres;
58  resolvente minres;
59  unsigned long ** sev;
60  int length;
61  int regularity;
62  short list_length;
63  short references;
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
80resolvente syReorder(resolvente res,int length,
81        syStrategy syzstr,BOOLEAN toCopy/*=TRUE*/,resolvente totake/*=NULL*/);
82
83syStrategy syResolution(ideal arg, int maxlength,intvec * w, BOOLEAN minim);
84
85void syMinimizeResolvente(resolvente res, int length, int first);
86
87intvec * syBetti(resolvente res,int length, int * regularity,
88         intvec* weights=NULL,BOOLEAN tomin=TRUE, int * row_shift=NULL);
89
90ideal syMinBase(ideal arg);
91
92BOOLEAN syTestOrder(ideal i);
93
94void syReOrderResolventFB(resolvente res,int length, int initial=1);
95
96resolvente syLaScala1(ideal arg,int * length);
97syStrategy syLaScala3(ideal arg,int * length);
98
99syStrategy syLaScala(ideal arg, int& maxlength, intvec* weights = NULL);
100
101syStrategy syHilb(ideal arg,int * length);
102syStrategy syKosz(ideal arg,int * length);
103
104void syDeleteRes(resolvente * res,int length);
105void syKillComputation(syStrategy syzstr, ring r=currRing);
106intvec * syBettiOfComputation(syStrategy syzstr, BOOLEAN minim=TRUE,int * row_shift=NULL, intvec *weights=NULL);
107BOOLEAN syBetti1(leftv res, leftv u);
108BOOLEAN syBetti2(leftv res, leftv u, leftv w);
109int syLength(syStrategy syzstr);
110int sySize(syStrategy syzstr);
111int syDim(syStrategy syzstr);
112syStrategy syCopy(syStrategy syzstr);
113void syPrint(syStrategy syzstr);
114lists syConvRes(syStrategy syzstr,BOOLEAN toDel=FALSE,int add_row_shift=0);
115syStrategy syConvList(lists li,BOOLEAN toDel=FALSE);
116syStrategy syForceMin(lists li);
117syStrategy syMinimize(syStrategy syzstr);
118void syKillEmptyEntres(resolvente res,int length);
119
120extern int *  currcomponents;
121extern long *  currShiftedComponents;
122
123int syzcomp1dpc(poly p1, poly p2);
124void syDeletePair(SObject * so);
125void syInitializePair(SObject * so);
126void syCopyPair(SObject * argso, SObject * imso);
127void syCompactifyPairSet(SSet sPairs, int sPlength, int first);
128void syCompactify1(SSet sPairs, int* sPlength, int first);
129SRes syInitRes(ideal arg,int * length, intvec * Tl, intvec * cw=NULL);
130void syResetShiftedComponents(syStrategy syzstr, int index,int hilb=0);
131void syEnlargeFields(syStrategy syzstr,int index);
132void syEnterPair(syStrategy syzstr, SObject * so, int * sPlength,int index);
133SSet syChosePairs(syStrategy syzstr, int *index, int *howmuch, int * actdeg);
134int syInitSyzMod(syStrategy syzstr, int index, int init=17);
135long syReorderShiftedComponents(long * sc, int n);
136void syGaussForOne(ideal arg,int gen,int ModComp,int from=-1,int till=0);
137void syEnterPair(SSet sPairs, SObject * so, int * sPlength,int index);
138void syEnterPair(syStrategy syzstr, SObject * so, int * sPlength,int index);
139syStrategy syKosz(ideal arg,int * length);
140
141resolvente syReorder(resolvente res,int length,
142        syStrategy syzstr,BOOLEAN toCopy=TRUE,resolvente totake=NULL);
143
144#endif
Note: See TracBrowser for help on using the repository browser.