source: git/Singular/kutil.h @ 029516e

spielwiese
Last change on this file since 029516e was 46feb1, checked in by Hans Schönemann <hannes@…>, 26 years ago
* hannes: use ReAlloc for enlargeT, enlargeL (kutil.cc) git-svn-id: file:///usr/local/Singular/svn/trunk@1497 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 5.8 KB
Line 
1#ifndef KUTIL_H
2#define KUTIL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: kutil.h,v 1.9 1998-04-27 16:09:37 Singular Exp $ */
7/*
8* ABSTRACT: kernel: utils for std
9*/
10#include "structs.h"
11#include "mmemory.h"
12#include "ring.h"
13#include <string.h>
14
15#define setmax 16
16
17typedef int* intset;
18
19struct sTObject{
20                 poly  p;
21                 int ecart,length;
22               };
23struct sLObject{
24                 poly  p;
25                 poly  p1,p2; /*- the pair p comes from -*/
26                 poly  lcm;   /*- the lcm of p1,p2 -*/
27                 int ecart,length;
28               };
29typedef struct sTObject TObject;
30typedef struct sLObject LObject;
31typedef TObject * TSet;
32typedef LObject * LSet;
33
34//extern BOOLEAN interpt;
35//extern BOOLEAN kActive;
36//extern int cp,c3;
37//extern BOOLEAN homog;
38//extern BOOLEAN news;
39//extern ideal Shdl;
40//extern polyset S;
41//extern int sl;
42//extern intset ecartS;
43//extern intset fromQ;
44//extern TSet T;
45//extern int tl,tmax;
46//extern LSet L;
47//extern int Ll,Lmax;
48//extern BOOLEAN honey,sugarCrit;
49//extern BOOLEAN * NotUsedAxis;
50//extern void (*red)(LObject * L,kStrategy strat);
51//extern void (*initEcart)(LObject * L);
52//extern int (*posInT)(TSet T,int tl,LObject h);
53//extern int (*posInL)(LSet set, int length, LObject L,kStrategy strat);
54//extern void (*enterS)(LObject h, int pos,kStrategy strat);
55//extern void (*initEcartPair)(LObject * h, poly f, poly g, int ecartF, int ecartG);
56//extern int ak;
57extern int HCord;
58//extern LObject P;
59//extern poly tail;
60//extern BOOLEAN fromT;
61//extern sleftv kIdeal;
62
63class skStrategy;
64typedef skStrategy * kStrategy;
65class skStrategy
66{
67  public:
68    kStrategy next;
69    void (*red)(LObject * L,kStrategy strat);
70    void (*initEcart)(LObject * L);
71    int (*posInT)(TSet T,int tl,LObject h);
72    int (*posInL)(LSet set, int length, LObject L,kStrategy strat);
73    void (*enterS)(LObject h, int pos,kStrategy strat);
74    void (*initEcartPair)(LObject * h, poly f, poly g, int ecartF, int ecartG);
75    int (*posInLOld)(LSet L,int Ll, LObject l,kStrategy strat);
76    void (*spSpolyLoop)(poly p1, poly p2, poly m, poly spNoether);
77    pFDegProc pOldFDeg;
78    ideal Shdl;
79    ideal D; /*V(S) is in D(D)*/
80    ideal M; /*set of minimal generators*/
81    polyset S;
82    intset ecartS;
83    intset fromQ;
84    TSet T;
85    LSet L;
86    LSet    B;
87    poly    kHEdge;
88    poly    kNoether;
89    BOOLEAN * NotUsedAxis;
90    LObject P;
91    poly tail;
92    leftv kIdeal;
93    intvec * kModW;
94    BOOLEAN *pairtest;/*used for enterOnePair*/
95    int cp,c3;
96    int sl,mu;
97    int tl,tmax;
98    int Ll,Lmax;
99    int Bl,Bmax;
100    int ak,LazyDegree,LazyPass;
101    int syzComp;
102    int HCord;
103    int lastAxis;
104    int newIdeal;
105    int minim;
106    BOOLEAN interpt;
107    BOOLEAN homog;
108    BOOLEAN kHEdgeFound;
109    BOOLEAN honey,sugarCrit;
110    BOOLEAN Gebauer,noTailReduction;
111    BOOLEAN fromT;
112    BOOLEAN noetherSet;
113    BOOLEAN update;
114    BOOLEAN posInLOldFlag;
115           /*FALSE, if posInL == posInL10*/
116    char    redTailChange;
117    char    news;
118    char    newt;/*used for messageSets*/
119};
120
121void deleteHC(poly *p, int *e, int *l, kStrategy strat);
122void deleteInS (int i,kStrategy strat);
123void cleanT (kStrategy strat);
124LSet initL ();
125void deleteInL(LSet set, int *length, int j,kStrategy strat);
126void enterL (LSet *set,int *length, int *LSetmax, LObject p,int at);
127void initEcartPairBba (LObject* Lp,poly f,poly g,int ecartF,int ecartG);
128void initEcartPairMora (LObject* Lp,poly f,poly g,int ecartF,int ecartG);
129int posInS (polyset set,int length,poly p);
130int posInT0 (TSet set,int length,LObject p);
131int posInT1 (TSet set,int length,LObject p);
132int posInT2 (TSet set,int length,LObject p);
133int posInT11 (TSet set,int length,LObject p);
134int posInT13 (TSet set,int length,LObject p);
135int posInT15 (TSet set,int length,LObject p);
136int posInT17 (TSet set,int length,LObject p);
137int posInT19 (TSet set,int length,LObject p);
138void reorderS (int* suc,kStrategy strat);
139int posInL0 (LSet set, int length, LObject L,kStrategy strat);
140int posInL11 (LSet set, int length, LObject L,kStrategy strat);
141int posInL13 (LSet set, int length, LObject L,kStrategy strat);
142int posInL15 (LSet set, int length, LObject L,kStrategy strat);
143int posInL17 (LSet set, int length, LObject L,kStrategy strat);
144poly redtailBba (poly p,int pos,kStrategy strat);
145poly redtailSyz (poly p,int pos,kStrategy strat);
146poly redtail (poly p,int pos,kStrategy strat);
147void enterpairs (poly h, int k, int ec, int pos,kStrategy strat);
148void entersets (LObject h);
149void pairs ();
150void message (int i,int* reduc,int* olddeg,kStrategy strat);
151void messageStat (int srmax,int lrmax,int hilbcount,kStrategy strat);
152void messageSets (kStrategy strat);
153void initEcartNormal (LObject* h);
154void initEcartBBA (LObject* h);
155void initS (ideal F, ideal Q,kStrategy strat);
156void initSL (ideal F, ideal Q,kStrategy strat);
157void updateS(BOOLEAN toT,kStrategy strat);
158void enterSBba (LObject p, int pos,kStrategy strat);
159void enterT (LObject p,kStrategy strat);
160void enterTBba (LObject p, int pos,kStrategy strat);
161void cancelunit (LObject* p);
162void HEckeTest (poly pp,kStrategy strat);
163void redtailS (poly* h,int maxIndex);
164void redtailMora (poly* h,int maxIndex);
165void initBuchMoraCrit(kStrategy strat);
166void initHilbCrit(ideal F, ideal Q, intvec **hilb,kStrategy strat);
167void initBuchMoraPos(kStrategy strat);
168void initBuchMora (ideal F, ideal Q,kStrategy strat);
169void exitBuchMora (kStrategy strat);
170void updateResult(ideal r,ideal Q,kStrategy strat);
171void completeReduce (kStrategy strat);
172BOOLEAN homogTest(polyset F, int Fmax);
173BOOLEAN newHEdge(polyset S, int ak,kStrategy strat);
174
175rOrderType_t spGetOrderType(ring r, int modrank, int syzcomp);
176
177inline TSet initT () { return (TSet)Alloc0(setmax*sizeof(TObject)); }
178#ifdef KDEBUG
179#define kTest(A) K_Test(__FILE__,__LINE__,A)
180void K_Test(char *f, int i,kStrategy strat);
181#else
182#define kTest(A)
183#endif
184#endif
Note: See TracBrowser for help on using the repository browser.