My Project  debian-1:4.1.1-p2+ds-4build4
cf_iter.h
Go to the documentation of this file.
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:
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& );
59 
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 */
Header for factory's main class CanonicalForm.
term * termList
Definition: cf_iter.h:35
#define CF_NO_INLINE
Definition: cf_iter.h:21
definition of configurable inline ‘CFIterator’ methods.
class to iterate through CanonicalForm's
Definition: cf_iter.h:44
CF_NO_INLINE CanonicalForm coeff() const
get the current coefficient
bool ispoly
Definition: cf_iter.h:48
CFIterator()
Definition: cf_iter.cc:15
CF_NO_INLINE int exp() const
get the current exponent
~CFIterator()
Definition: cf_iter.cc:83
CF_NO_INLINE CFIterator & operator++()
CFIterator::operator ++ (), operator ++ ( int )
CF_NO_INLINE int hasTerms() const
check if iterator has reached the end of CanonicalForm
CanonicalForm data
Definition: cf_iter.h:46
termList cursor
Definition: cf_iter.h:47
bool hasterms
Definition: cf_iter.h:48
CFIterator & operator=(const CFIterator &)
Definition: cf_iter.cc:89
factory's main class
Definition: canonicalform.h:83
factory's class for variables
Definition: factory.h:118
Definition: int_poly.h:33