source: git/Singular/structs.h @ 224da5b

fieker-DuValspielwiese
Last change on this file since 224da5b was 8c8bea, checked in by Olaf Bachmann <obachman@…>, 25 years ago
* preparation for buckets git-svn-id: file:///usr/local/Singular/svn/trunk@3063 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 5.1 KB
Line 
1#ifndef STRUCTS_H
2#define STRUCTS_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: structs.h,v 1.20 1999-05-26 16:24:02 obachman Exp $ */
7/*
8* ABSTRACT
9*/
10
11/* standard types */
12typedef unsigned char  uchar ;
13typedef unsigned short CARDINAL;
14typedef short BOOLEAN;
15
16typedef void * Sy_reference;
17#define ADDRESS Sy_reference
18#define BITSET  unsigned int
19
20/* EXPONENT_TYPE is determined by configure und defined in mod2.h */
21typedef EXPONENT_TYPE Exponent_t;
22
23enum tHomog
24{
25   isNotHomog = FALSE,
26   isHomog    = TRUE,
27   testHomog
28};
29enum noeof_t
30{
31  noeof_brace = 1,
32  noeof_asstring,
33  noeof_block,
34  noeof_bracket,
35  noeof_comment,
36  noeof_procname,
37  noeof_string
38};
39
40struct sip_memHeap;
41typedef struct sip_memHeap ip_memHeap;
42typedef ip_memHeap *       memHeap;
43
44/* C++-part */
45#ifdef __cplusplus
46class ip_smatrix;
47class idrec;
48class intvec;
49class sleftv;
50class slists;
51class sattr;
52class skStrategy;
53class ssyStrategy;
54class procinfo;
55class namerec;
56class kBucket;
57#endif
58
59struct  sip_sring;
60struct  sip_sideal;
61struct  sip_link;
62struct  spolynom;
63struct _ssubexpr;
64struct _sssym;
65struct snumber;
66struct sip_command;
67struct sip_package;
68struct s_si_link_extension;
69struct reca;
70
71typedef struct _ssubexpr   sSubexpr;
72typedef struct _sssym      ssym;
73typedef struct spolyrec    polyrec;
74typedef struct snumber     rnumber;
75typedef struct sip_sideal  ip_sideal;
76typedef struct sip_smap    ip_smap;
77typedef struct sip_sring   ip_sring;
78typedef struct sip_link    ip_link;
79typedef struct sip_command ip_command;
80typedef struct sip_package ip_package;
81
82
83/* the pointer types */
84typedef ip_sring *         ring;
85typedef int                idtyp;
86typedef rnumber *          number;
87typedef polyrec *          poly;
88typedef poly *             polyset;
89typedef ip_sideal *        ideal;
90typedef ip_smap *          map;
91typedef ideal *            resolvente;
92typedef union uutypes      utypes;
93typedef ip_command *       command;
94typedef struct s_si_link_extension *si_link_extension;
95typedef struct reca *      alg;
96#ifdef __cplusplus
97typedef idrec *            idhdl;
98typedef ip_smatrix *       matrix;
99typedef ip_link *          si_link;
100typedef sleftv *           leftv;
101typedef slists *           lists;
102typedef sSubexpr *         Subexpr;
103typedef sattr *            attr;
104typedef skStrategy *       kStrategy;
105typedef ip_package *       package;
106typedef ssyStrategy *      syStrategy;
107typedef procinfo *         procinfov;
108typedef namerec *          namehdl;
109typedef kBucket*           kBucket_pt;
110
111struct _scmdnames
112{
113  char *name;
114  short alias;
115  short tokval;
116  short toktype;
117};
118typedef struct _scmdnames cmdnames;
119
120struct sip_sring
121{
122  idhdl      idroot; /* local objects */
123  int*       order;  /* array of orderings */
124  int*       block0; /* starting pos.*/
125  int*       block1; /* ending pos.*/
126  char**     parameter; /* names of parameters */
127  number     minpoly;
128  short**    wvhdl;  /* array of weight vectors */
129  char **    names;  /* array of variable names */
130  /* extension to the ring structure: qring */
131  ideal      qideal;
132#ifdef SDRING
133  short      partN;
134#endif
135  short      ch;     /* characteristic */
136  short      ch_flags; /* additional char-flags */
137  short      N;      /* number of vars */
138
139  short      P;      /* number of pars */
140  short      OrdSgn; /* 1 for polynomial rings, -1 otherwise */
141
142  short      ref;
143
144  // what follows below here should be set by rComplete, _only_
145  int       *VarOffset;   /* controls indexing of exponents */
146  short     VarCompIndex; /* location of component in exp vector */
147  short     VarLowIndex;  /* lowest index of an exponent */
148  short     VarHighIndex; /* Highest index of an expoentn */
149
150#ifdef RDEBUG
151  short      no; /* unique id for rings */
152#endif
153};
154
155struct sip_sideal
156{
157  poly*  m;
158  long rank;
159  int nrows;
160  int ncols;
161  #define IDELEMS(i) ((i)->ncols)
162  inline int& idelems(void) { return ncols; }
163};
164
165struct sip_smap
166{
167  poly *m;
168  char *preimage;
169  int nrows;
170  int ncols;
171};
172#endif
173
174/* the function pointer types */
175typedef number (*numberfunc)(number a,number b);
176
177typedef void    (*pSetmProc)(poly p);
178typedef int     (*pLDegProc)(poly p, int *length);
179typedef int     (*pFDegProc)(poly p);
180typedef int     (*pCompProc)(poly p1, poly p2);
181
182extern ring      currRing;
183
184/*
185**  7. runtime procedures/global data
186*/
187
188/* 7.1 C-routines : */
189
190#ifdef __cplusplus
191extern "C" {
192#endif
193void  m2_end(short i);
194#ifdef __cplusplus
195}
196#endif
197
198/* 7.2 C++-routines : */
199
200#ifdef __cplusplus
201int   inits(void);
202void  singular_help(char *str, BOOLEAN example);
203#ifdef buildin_help
204int   singular_manual(char *str);
205#endif
206#ifdef buildin_rand
207extern int siSeed;
208int siRand();
209#endif
210#endif
211
212/*the general set of std-options --> kutil.cc */
213extern BITSET test;
214/*the general set of verbose-options --> febase.cc */
215#ifdef __cplusplus
216extern "C" BITSET verbose;
217#else
218extern BITSET verbose;
219#endif
220/*debugging the bison grammar --> grammar.cc*/
221#ifdef YYDEBUG
222#if YYDEBUG
223extern int    yydebug;
224#endif
225#endif
226
227#ifdef HAVE_LIBPARSER
228#ifdef __cplusplus
229class libstack;
230typedef libstack *  libstackv;
231#endif
232#endif /* HAVE_LIBPARSER */
233
234#endif
235
Note: See TracBrowser for help on using the repository browser.