source: git/Singular/kutil.h @ 1caa72

Last change on this file since 1caa72 was 1caa72, checked in by Olaf Bachmann <obachman@…>, 26 years ago
1998-04-06 Olaf Bachmann <> * spSpolyLoop.h: neww calling interface for spGetSpolyLoop * (kNF): moved strat->ak field initailization out of initBuchMora into single routines * (feGetSearchPath): added feGetSearchPath; changed algorithm for searching files: $SINGULARPATH -> relative to executable -> burnt-in locations * added find_exec.c to get absolute pathname of executable git-svn-id: file:///usr/local/Singular/svn/trunk@1341 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 5.9 KB
1#ifndef KUTIL_H
2#define KUTIL_H
4*  Computer Algebra System SINGULAR     *
6/* $Id: kutil.h,v 1.7 1998-04-06 17:59:33 obachman Exp $ */
8* ABSTRACT: kernel: utils for std
10#include "structs.h"
11#include "mmemory.h"
12#include "ring.h"
13#include <string.h>
15#define setmax 16
17typedef int* intset;
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;
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;
63class skStrategy;
64typedef skStrategy * kStrategy;
65class skStrategy
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    BOOLEAN interpt;
106    BOOLEAN homog;
107    BOOLEAN news;
108    BOOLEAN newt;/*used for messageSets*/
109    BOOLEAN kHEdgeFound;
110    BOOLEAN honey,sugarCrit;
111    BOOLEAN Gebauer,noTailReduction;
112    BOOLEAN fromT;
113    BOOLEAN noetherSet;
114    BOOLEAN update;
115    BOOLEAN posInLOldFlag;
116           /*FALSE, if posInL == posInL10*/
117    int minim;
120void deleteHC(poly *p, int *e, int *l, kStrategy strat);
121void deleteInS (int i,kStrategy strat);
122void enlargeT (TSet* T,int* length,int incr);
123void cleanT (kStrategy strat);
124LSet initL ();
125void enlargeL (LSet* L,int* length,int incr);
126void deleteInL(LSet set, int *length, int j,kStrategy strat);
127void enterL (LSet *set,int *length, int *LSetmax, LObject p,int at);
128void initEcartPairBba (LObject* Lp,poly f,poly g,int ecartF,int ecartG);
129void initEcartPairMora (LObject* Lp,poly f,poly g,int ecartF,int ecartG);
130int posInS (polyset set,int length,poly p);
131int posInT0 (TSet set,int length,LObject p);
132int posInT1 (TSet set,int length,LObject p);
133int posInT2 (TSet set,int length,LObject p);
134int posInT11 (TSet set,int length,LObject p);
135int posInT13 (TSet set,int length,LObject p);
136int posInT15 (TSet set,int length,LObject p);
137int posInT17 (TSet set,int length,LObject p);
138int posInT19 (TSet set,int length,LObject p);
139void reorderS (int* suc,kStrategy strat);
140int posInL0 (LSet set, int length, LObject L,kStrategy strat);
141int posInL11 (LSet set, int length, LObject L,kStrategy strat);
142int posInL13 (LSet set, int length, LObject L,kStrategy strat);
143int posInL15 (LSet set, int length, LObject L,kStrategy strat);
144int posInL17 (LSet set, int length, LObject L,kStrategy strat);
145poly redtailBba (poly p,int pos,kStrategy strat);
146poly redtailSyz (poly p,int pos,kStrategy strat);
147poly redtail (poly p,int pos,kStrategy strat);
148void enterpairs (poly h, int k, int ec, int pos,kStrategy strat);
149void entersets (LObject h);
150void pairs ();
151void message (int i,int* reduc,int* olddeg,kStrategy strat);
152void messageStat (int srmax,int lrmax,int hilbcount,kStrategy strat);
153void messageSets (kStrategy strat);
154void initEcartNormal (LObject* h);
155void initEcartBBA (LObject* h);
156void initS (ideal F, ideal Q,kStrategy strat);
157void initSL (ideal F, ideal Q,kStrategy strat);
158void updateS(BOOLEAN toT,kStrategy strat);
159void enterSBba (LObject p, int pos,kStrategy strat);
160void enterT (LObject p,kStrategy strat);
161void enterTBba (LObject p, int pos,kStrategy strat);
162void cancelunit (LObject* p);
163void HEckeTest (poly pp,kStrategy strat);
164void redtailS (poly* h,int maxIndex);
165void redtailMora (poly* h,int maxIndex);
166void initBuchMoraCrit(kStrategy strat);
167void initHilbCrit(ideal F, ideal Q, intvec **hilb,kStrategy strat);
168void initBuchMoraPos(kStrategy strat);
169void initBuchMora (ideal F, ideal Q,kStrategy strat);
170void exitBuchMora (kStrategy strat);
171void updateResult(ideal r,ideal Q,kStrategy strat);
172void completeReduce (kStrategy strat);
173BOOLEAN homogTest(polyset F, int Fmax);
174BOOLEAN newHEdge(polyset S, int ak,kStrategy strat);
176rOrderType_t spGetOrderType(ring r, int modrank, int syzcomp);
178inline TSet initT () { return (TSet)Alloc0(setmax*sizeof(TObject)); }
179#ifdef KDEBUG
180#define kTest(A) K_Test(__FILE__,__LINE__,A)
181void K_Test(char *f, int i,kStrategy strat);
183#define kTest(A)
Note: See TracBrowser for help on using the repository browser.