source: git/Singular/kutil.h @ 6f2edc

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