My Project
Loading...
Searching...
No Matches
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
35class term;
36typedef 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**/
45private:
48 bool ispoly, hasterms;
49public:
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 */
Header for factory's main class CanonicalForm.
#define CF_NO_INLINE
Definition: canonicalform.h:47
term * termList
Definition: cf_iter.h:36
definition of configurable inline ‘CFIterator’ methods.
class to iterate through CanonicalForm's
Definition: cf_iter.h:44
CF_NO_INLINE int exp() const
get the current exponent
CF_NO_INLINE CanonicalForm coeff() const
get the current coefficient
CanonicalForm data
Definition: cf_iter.h:46
termList cursor
Definition: cf_iter.h:47
bool hasterms
Definition: cf_iter.h:48
CF_NO_INLINE int hasTerms() const
check if iterator has reached the end of CanonicalForm
factory's main class
Definition: canonicalform.h:86
factory's class for variables
Definition: variable.h:33
Definition: int_poly.h:33
#define FACTORY_PUBLIC
Definition: globaldefs.h:25