source: git/factory/cf_iter.h @ 34f6d2

fieker-DuValspielwiese
Last change on this file since 34f6d2 was 3edea1, checked in by Hans Schoenemann <hannes@…>, 3 years ago
cygwin port: shared lib libfactory
  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[493c477]1/* emacs edit mode for this file is -*- C++ -*- */
[2dd068]2
[abddbe]3/**
4 * @file cf_iter.h
5 *
6 * Iterators for CanonicalForm's
7**/
8
[493c477]9#ifndef INCL_CF_ITER_H
10#define INCL_CF_ITER_H
[2dd068]11
[e4fe2b]12// #include "config.h"
[b973c0]13
[2dd068]14#include "canonicalform.h"
15
16/*BEGINPUBLIC*/
17
[f80ca1]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
[2dd068]35class term;
36typedef term * termList;
37
[abddbe]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**/
[3edea1]44class FACTORY_PUBLIC CFIterator {
[2dd068]45private:
46    CanonicalForm data;
47    termList cursor;
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
[f80ca1]60    CF_NO_INLINE CFIterator& operator++ ();
61    CF_NO_INLINE CFIterator& operator++ ( int );
[abddbe]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
[2dd068]66};
67
68/*ENDPUBLIC*/
69
[f80ca1]70#ifdef CF_USE_INLINE
71#include "cf_iter_inline.cc"
72#endif
73
[493c477]74#endif /* ! INCL_CF_ITER_H */
Note: See TracBrowser for help on using the repository browser.