[35aab3] | 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 | |
---|
[599326] | 18 | #include <kernel/npolygon.h> |
---|
[35aab3] | 19 | |
---|
[f599a46] | 20 | /*enum spectrumState |
---|
[35aab3] | 21 | { |
---|
| 22 | spectrumOK, |
---|
| 23 | spectrumZero, |
---|
| 24 | spectrumBadPoly, |
---|
| 25 | spectrumNoSingularity, |
---|
| 26 | spectrumNotIsolated, |
---|
| 27 | spectrumDegenerate, |
---|
| 28 | spectrumWrongRing, |
---|
| 29 | spectrumNoHC, |
---|
| 30 | spectrumUnspecErr |
---|
[f599a46] | 31 | };*/ //TODO move to Singular |
---|
[35aab3] | 32 | |
---|
| 33 | // ---------------------------------------------------------------------------- |
---|
| 34 | |
---|
| 35 | class spectrumPolyNode |
---|
| 36 | { |
---|
| 37 | public: |
---|
| 38 | |
---|
| 39 | spectrumPolyNode *next; |
---|
| 40 | poly mon; |
---|
| 41 | Rational weight; |
---|
| 42 | poly nf; |
---|
[9af8d18] | 43 | ring r; |
---|
[35aab3] | 44 | |
---|
| 45 | spectrumPolyNode( ); |
---|
[9af8d18] | 46 | spectrumPolyNode( spectrumPolyNode*,poly,const Rational&,poly, const ring); |
---|
[35aab3] | 47 | ~spectrumPolyNode( ); |
---|
| 48 | |
---|
| 49 | void copy_zero ( void ); |
---|
[9af8d18] | 50 | void copy_shallow( spectrumPolyNode*,poly,const Rational&,poly, const ring); |
---|
[35aab3] | 51 | void copy_shallow( spectrumPolyNode& ); |
---|
| 52 | }; |
---|
| 53 | |
---|
| 54 | // ---------------------------------------------------------------------------- |
---|
| 55 | |
---|
| 56 | class spectrumPolyList |
---|
| 57 | { |
---|
| 58 | public: |
---|
| 59 | |
---|
| 60 | spectrumPolyNode *root; |
---|
| 61 | int N; |
---|
| 62 | newtonPolygon *np; |
---|
| 63 | |
---|
| 64 | spectrumPolyList( ); |
---|
| 65 | spectrumPolyList( newtonPolygon* ); |
---|
| 66 | ~spectrumPolyList( ); |
---|
| 67 | |
---|
| 68 | void copy_zero ( void ); |
---|
| 69 | void copy_shallow( spectrumPolyNode*,int,newtonPolygon* ); |
---|
| 70 | void copy_shallow( spectrumPolyList& ); |
---|
| 71 | |
---|
[9af8d18] | 72 | void insert_node( poly,poly, const ring ); |
---|
[35aab3] | 73 | void delete_node( spectrumPolyNode** ); |
---|
| 74 | |
---|
[9af8d18] | 75 | void delete_monomial( poly, const ring ); |
---|
[35aab3] | 76 | |
---|
[f599a46] | 77 | //spectrumState spectrum( lists*,int ); |
---|
[35aab3] | 78 | |
---|
| 79 | #ifdef SPLIST_PRINT |
---|
| 80 | friend ostream & operator << ( ostream&,const spectrumPolyList& ); |
---|
| 81 | #endif |
---|
| 82 | }; |
---|
| 83 | |
---|
| 84 | #endif /* SPLIST_H */ |
---|
| 85 | |
---|
| 86 | // ---------------------------------------------------------------------------- |
---|
| 87 | // splist.h |
---|
| 88 | // end of file |
---|
| 89 | // ---------------------------------------------------------------------------- |
---|