spielwiese
Last change
on this file since 33dd62 was
abddbe,
checked in by Martin Lee <martinlee84@…>, 9 years ago
|
chg: added brief descriptions to some files
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | |
---|
3 | /** |
---|
4 | * @file cf_iter.h |
---|
5 | * |
---|
6 | * Iterators for CanonicalForm's |
---|
7 | **/ |
---|
8 | |
---|
9 | #ifndef INCL_CF_ITER_H |
---|
10 | #define INCL_CF_ITER_H |
---|
11 | |
---|
12 | // #include "config.h" |
---|
13 | |
---|
14 | #include "canonicalform.h" |
---|
15 | |
---|
16 | /*BEGINPUBLIC*/ |
---|
17 | |
---|
18 | #undef CF_INLINE |
---|
19 | #define CF_INLINE |
---|
20 | #undef CF_NO_INLINE |
---|
21 | #define CF_NO_INLINE |
---|
22 | |
---|
23 | /*ENDPUBLIC*/ |
---|
24 | |
---|
25 | #ifdef CF_USE_INLINE |
---|
26 | #undef CF_INLINE |
---|
27 | #define CF_INLINE inline |
---|
28 | #else |
---|
29 | #undef CF_INLINE |
---|
30 | #define CF_INLINE |
---|
31 | #endif |
---|
32 | |
---|
33 | /*BEGINPUBLIC*/ |
---|
34 | |
---|
35 | class term; |
---|
36 | typedef term * termList; |
---|
37 | |
---|
38 | /** |
---|
39 | * class to iterate through CanonicalForm's |
---|
40 | * |
---|
41 | * @note a (multivariate) polynomial is viewed as a univariate poly in its main |
---|
42 | * variable |
---|
43 | **/ |
---|
44 | class CFIterator { |
---|
45 | private: |
---|
46 | CanonicalForm data; |
---|
47 | termList cursor; |
---|
48 | bool ispoly, hasterms; |
---|
49 | public: |
---|
50 | CFIterator (); |
---|
51 | CFIterator ( const CFIterator& ); |
---|
52 | CFIterator ( const CanonicalForm& ); |
---|
53 | CFIterator ( const CanonicalForm&, const Variable& ); |
---|
54 | |
---|
55 | ~CFIterator (); |
---|
56 | |
---|
57 | CFIterator& operator= ( const CFIterator& ); |
---|
58 | CFIterator& operator= ( const CanonicalForm& ); |
---|
59 | |
---|
60 | CF_NO_INLINE CFIterator& operator++ (); |
---|
61 | CF_NO_INLINE CFIterator& operator++ ( int ); |
---|
62 | CF_NO_INLINE int hasTerms () const; ///< check if iterator has reached |
---|
63 | ///< the end of CanonicalForm |
---|
64 | CF_NO_INLINE CanonicalForm coeff () const;///< get the current coefficient |
---|
65 | CF_NO_INLINE int exp () const; ///< get the current exponent |
---|
66 | }; |
---|
67 | |
---|
68 | /*ENDPUBLIC*/ |
---|
69 | |
---|
70 | #ifdef CF_USE_INLINE |
---|
71 | #include "cf_iter_inline.cc" |
---|
72 | #endif |
---|
73 | |
---|
74 | #endif /* ! INCL_CF_ITER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.