1 | // ---------------------------------------------------------------------------- |
---|
2 | // splist.h |
---|
3 | // begin of file |
---|
4 | // Stephan Endrass, endrass@mathematik.uni-mainz.de |
---|
5 | // 23.7.99 |
---|
6 | // ---------------------------------------------------------------------------- |
---|
7 | |
---|
8 | // ---------------------------------------------------------------------------- |
---|
9 | // Description: the class spectrumPolyList is to hold monomials |
---|
10 | // and their normal forms with respect to a given standard basis |
---|
11 | // and a given ordering. On this list we run a standard basis |
---|
12 | // conversion algorithm to compute the spectrum |
---|
13 | // ---------------------------------------------------------------------------- |
---|
14 | |
---|
15 | #ifndef SPLIST_H |
---|
16 | #define SPLIST_H |
---|
17 | |
---|
18 | #include "npolygon.h" |
---|
19 | |
---|
20 | enum spectrumState |
---|
21 | { |
---|
22 | spectrumOK, |
---|
23 | spectrumZero, |
---|
24 | spectrumBadPoly, |
---|
25 | spectrumNoSingularity, |
---|
26 | spectrumNotIsolated, |
---|
27 | spectrumDegenerate, |
---|
28 | spectrumWrongRing, |
---|
29 | spectrumNoHC, |
---|
30 | spectrumUnspecErr |
---|
31 | }; |
---|
32 | |
---|
33 | // ---------------------------------------------------------------------------- |
---|
34 | |
---|
35 | class spectrumPolyNode |
---|
36 | { |
---|
37 | public: |
---|
38 | |
---|
39 | spectrumPolyNode *next; |
---|
40 | poly mon; |
---|
41 | Rational weight; |
---|
42 | poly nf; |
---|
43 | |
---|
44 | spectrumPolyNode( ); |
---|
45 | spectrumPolyNode( spectrumPolyNode*,poly,const Rational&,poly ); |
---|
46 | ~spectrumPolyNode( ); |
---|
47 | |
---|
48 | void copy_zero ( void ); |
---|
49 | void copy_shallow( spectrumPolyNode*,poly,const Rational&,poly ); |
---|
50 | void copy_shallow( spectrumPolyNode& ); |
---|
51 | }; |
---|
52 | |
---|
53 | // ---------------------------------------------------------------------------- |
---|
54 | |
---|
55 | class spectrumPolyList |
---|
56 | { |
---|
57 | public: |
---|
58 | |
---|
59 | spectrumPolyNode *root; |
---|
60 | int N; |
---|
61 | newtonPolygon *np; |
---|
62 | |
---|
63 | spectrumPolyList( ); |
---|
64 | spectrumPolyList( newtonPolygon* ); |
---|
65 | ~spectrumPolyList( ); |
---|
66 | |
---|
67 | void copy_zero ( void ); |
---|
68 | void copy_shallow( spectrumPolyNode*,int,newtonPolygon* ); |
---|
69 | void copy_shallow( spectrumPolyList& ); |
---|
70 | |
---|
71 | void insert_node( poly,poly ); |
---|
72 | void delete_node( spectrumPolyNode** ); |
---|
73 | |
---|
74 | void delete_monomial( poly ); |
---|
75 | |
---|
76 | spectrumState spectrum( lists*,int ); |
---|
77 | |
---|
78 | #ifdef SPLIST_PRINT |
---|
79 | friend ostream & operator << ( ostream&,const spectrumPolyList& ); |
---|
80 | #endif |
---|
81 | }; |
---|
82 | |
---|
83 | #endif /* SPLIST_H */ |
---|
84 | |
---|
85 | // ---------------------------------------------------------------------------- |
---|
86 | // splist.h |
---|
87 | // end of file |
---|
88 | // ---------------------------------------------------------------------------- |
---|