source: git/Singular/kutil.h @ 64d729

spielwiese
Last change on this file since 64d729 was 07ddf5, checked in by Wilfred Pohl <pohl@…>, 25 years ago
in kStrategy kHomW git-svn-id: file:///usr/local/Singular/svn/trunk@2757 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.13 1998-12-15 10:08:50 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    intvec * kHomW;
70    BOOLEAN *pairtest;/*used for enterOnePair*/
71    int cp,c3;
72    int sl,mu;
73    int tl,tmax;
74    int Ll,Lmax;
75    int Bl,Bmax;
76    int ak,LazyDegree,LazyPass;
77    int syzComp;
78    int HCord;
79    int lastAxis;
80    int newIdeal;
81    int minim;
82    BOOLEAN interpt;
83    BOOLEAN homog;
84    BOOLEAN kHEdgeFound;
85    BOOLEAN honey,sugarCrit;
86    BOOLEAN Gebauer,noTailReduction;
87    BOOLEAN fromT;
88    BOOLEAN noetherSet;
89    BOOLEAN update;
90    BOOLEAN posInLOldFlag;
91           /*FALSE, if posInL == posInL10*/
92    char    redTailChange;
93    char    news;
94    char    newt;/*used for messageSets*/
95};
96
97void deleteHC(poly *p, int *e, int *l, kStrategy strat);
98void deleteInS (int i,kStrategy strat);
99void cleanT (kStrategy strat);
100LSet initL ();
101void deleteInL(LSet set, int *length, int j,kStrategy strat);
102void enterL (LSet *set,int *length, int *LSetmax, LObject p,int at);
103void initEcartPairBba (LObject* Lp,poly f,poly g,int ecartF,int ecartG);
104void initEcartPairMora (LObject* Lp,poly f,poly g,int ecartF,int ecartG);
105int posInS (polyset set,int length,poly p);
106int posInT0 (const TSet set,const int length,const LObject &p);
107int posInT1 (const TSet set,const int length,const LObject &p);
108int posInT2 (const TSet set,const int length,const LObject &p);
109int posInT11 (const TSet set,const int length,const LObject &p);
110int posInT13 (const TSet set,const int length,const LObject &p);
111int posInT15 (const TSet set,const int length,const LObject &p);
112int posInT17 (const TSet set,const int length,const LObject &p);
113int posInT19 (const TSet set,const int length,const LObject &p);
114void reorderS (int* suc,kStrategy strat);
115int posInL0 (const LSet set, const int length,
116             const LObject &L,const kStrategy strat);
117int posInL11 (const LSet set, const int length,
118             const LObject &L,const kStrategy strat);
119int posInL13 (const LSet set, const int length,
120             const LObject &L,const kStrategy strat);
121int posInL15 (const LSet set, const int length,
122             const LObject &L,const kStrategy strat);
123int posInL17 (const LSet set, const int length,
124             const LObject &L,const kStrategy strat);
125poly redtailBba (poly p,int pos,kStrategy strat);
126poly redtailSyz (poly p,int pos,kStrategy strat);
127poly redtail (poly p,int pos,kStrategy strat);
128void enterpairs (poly h, int k, int ec, int pos,kStrategy strat);
129void entersets (LObject h);
130void pairs ();
131void message (int i,int* reduc,int* olddeg,kStrategy strat);
132void messageStat (int srmax,int lrmax,int hilbcount,kStrategy strat);
133void messageSets (kStrategy strat);
134void initEcartNormal (LObject* h);
135void initEcartBBA (LObject* h);
136void initS (ideal F, ideal Q,kStrategy strat);
137void initSL (ideal F, ideal Q,kStrategy strat);
138void updateS(BOOLEAN toT,kStrategy strat);
139void enterSBba (LObject p, int pos,kStrategy strat);
140void enterT (LObject p,kStrategy strat);
141void enterTBba (LObject p, int pos,kStrategy strat);
142void cancelunit (LObject* p);
143void HEckeTest (poly pp,kStrategy strat);
144void redtailS (poly* h,int maxIndex);
145void redtailMora (poly* h,int maxIndex);
146void initBuchMoraCrit(kStrategy strat);
147void initHilbCrit(ideal F, ideal Q, intvec **hilb,kStrategy strat);
148void initBuchMoraPos(kStrategy strat);
149void initBuchMora (ideal F, ideal Q,kStrategy strat);
150void exitBuchMora (kStrategy strat);
151void updateResult(ideal r,ideal Q,kStrategy strat);
152void completeReduce (kStrategy strat);
153BOOLEAN homogTest(polyset F, int Fmax);
154BOOLEAN newHEdge(polyset S, int ak,kStrategy strat);
155
156rOrderType_t spGetOrderType(ring r, int modrank, int syzcomp);
157
158inline TSet initT () { return (TSet)Alloc0(setmax*sizeof(TObject)); }
159#ifdef KDEBUG
160#define kTest(A) K_Test(__FILE__,__LINE__,A)
161void K_Test(char *f, int i,kStrategy strat);
162#else
163#define kTest(A)
164#endif
165#endif
Note: See TracBrowser for help on using the repository browser.