Annotation of OpenXM/src/Ti/binomial.h, Revision 1.1.1.1
1.1 maekawa 1: /*
2: ** binomial.h Birk Huber, 4/99
3: ** -- header file for binomal type and main operations on binomials
4: **
5: **
6: ** TiGERS, Toric Groebner Basis Enumeration by Reverse Search
7: ** copyright (c) 1999 Birk Huber
8: **
9: */
10:
11: #ifndef BINOMIAL_H
12: extern int ring_N;
13: extern int ring_lv;
14: extern int *ring_weight;
15: #endif
16:
17: int ring_set(int n);
18: int ring_getvar(FILE *ifile);
19: #define ring_putvar(ofile,v) fprintf(ofile,"%c",'a'+v)
20:
21:
22: typedef int *monomial;
23: int monomial_divides(monomial m1, monomial m2);
24: int monomial_equal(monomial m1, monomial m2);
25: int monomial_lexcomp(monomial m1, monomial m2);
26: int monomial_rlexcomp(monomial m1, monomial m2);
27:
28: typedef struct bin_tag *binomial;
29: struct bin_tag{
30: int *exps1;
31: int *exps2;
32: int *E;
33: int ff;
34: int bf;
35: binomial next;
36: };
37:
38:
39: #define BINOMIAL 1
40: #define MONOMIAL 0
41: #define FACET 0
42: #define NONFACET 1
43: #define UNKNOWN -1
44:
45: #define binomial_next(b) (b->next)
46: #define binomial_lead(b) (b->exps1)
47: #define binomial_trail(b) (b->exps2)
48: #define monomial_set(b) (b->bf=MONOMIAL)
49: #define binomial_set(b) (b->bf=BINOMIAL)
50: #define binomial_facet(b) (b->ff)
51: binomial binomial_new();
52: void binomial_free(binomial m);
53: void binomial_read(FILE *is, binomial b);
54: void binomial_print(FILE *of, binomial b);
55: binomial monomial_spair(binomial b,monomial m);
56: void binomial_flip(binomial b);
57: int binomial_spair(binomial b1, binomial b2);
58: /*
59: ** return TRUE if binomials marking agrees with respect to the
60: ** lexicographic term order
61: */
62: #define binomial_ordered(b)\
63: ((monomial_lexcomp(binomial_lead(b),binomial_trail(b))>=0) ? TRUE : FALSE)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>