spielwiese
Release-4-3-2p1
Last change
on this file was
564dd8,
checked in by Hans Schoenemann <hannes@…>, 3 years ago
|
factorize in Z[x,..] w/o NTL
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | |
---|
3 | #ifndef INCL_FAC_ITERFOR_H |
---|
4 | #define INCL_FAC_ITERFOR_H |
---|
5 | |
---|
6 | // #include "config.h" |
---|
7 | |
---|
8 | #ifndef NOSTREAMIO |
---|
9 | #ifdef HAVE_IOSTREAM |
---|
10 | #include <iostream> |
---|
11 | #define OSTREAM std::ostream |
---|
12 | #elif defined(HAVE_IOSTREAM_H) |
---|
13 | #include <iostream.h> |
---|
14 | #define OSTREAM ostream |
---|
15 | #endif |
---|
16 | #endif /* NOSTREAMIO */ |
---|
17 | |
---|
18 | class IteratedFor |
---|
19 | { |
---|
20 | private: |
---|
21 | int MAX; |
---|
22 | int FROM; |
---|
23 | int TO; |
---|
24 | int N; |
---|
25 | bool last; |
---|
26 | int * index; |
---|
27 | int * imax; |
---|
28 | void fill ( int from, int n ); |
---|
29 | public: |
---|
30 | IteratedFor( int from, int to, int max ); |
---|
31 | IteratedFor( const IteratedFor & ); |
---|
32 | ~IteratedFor(); |
---|
33 | IteratedFor& operator= ( const IteratedFor & ); |
---|
34 | int from() const { return FROM; } |
---|
35 | int to() const { return TO; } |
---|
36 | int n() const { return N; }; |
---|
37 | int max() const { return MAX; } |
---|
38 | void nextiteration(); |
---|
39 | void operator++ () { nextiteration(); } |
---|
40 | void operator++ ( int ) { nextiteration(); } |
---|
41 | bool iterations_left() const { return ! last; } |
---|
42 | int operator[] ( int ) const; |
---|
43 | }; |
---|
44 | |
---|
45 | #ifndef NOSTREAMIO |
---|
46 | OSTREAM& operator<< ( OSTREAM &, const IteratedFor & ); |
---|
47 | #endif /* NOSTREAMIO */ |
---|
48 | |
---|
49 | #endif /* ! INCL_FAC_ITERFOR_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.