source: git/Singular/kutil.h @ c616d1

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