spielwiese
Last change
on this file since cc3e5e was
2dd068,
checked in by Rüdiger Stobbe <stobbe@…>, 28 years ago
|
Initial revision
git-svn-id: file:///usr/local/Singular/svn/trunk@6 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
873 bytes
|
Line | |
---|
1 | // emacs edit mode for this file is -*- C++ -*- |
---|
2 | // $Id: fac_iterfor.h,v 1.0 1996-05-17 10:59:40 stobbe Exp $ |
---|
3 | |
---|
4 | #ifndef INCL_ITERFOR_H |
---|
5 | #define INCL_ITERFOR_H |
---|
6 | |
---|
7 | /* |
---|
8 | $Log: not supported by cvs2svn $ |
---|
9 | */ |
---|
10 | |
---|
11 | #include <iostream.h> |
---|
12 | |
---|
13 | class IteratedFor |
---|
14 | { |
---|
15 | private: |
---|
16 | int MAX; |
---|
17 | int N; |
---|
18 | bool last; |
---|
19 | int * index; |
---|
20 | int * imax; |
---|
21 | void fill ( int from, int n ); |
---|
22 | public: |
---|
23 | IteratedFor( int n, int max ); |
---|
24 | IteratedFor( const IteratedFor & ); |
---|
25 | ~IteratedFor(); |
---|
26 | IteratedFor& operator= ( const IteratedFor & ); |
---|
27 | int n() const { return N; } |
---|
28 | int max() const { return MAX; } |
---|
29 | void nextiteration(); |
---|
30 | void operator++ () { nextiteration(); } |
---|
31 | void operator++ ( int ) { nextiteration(); } |
---|
32 | bool iterations_left() const { return ! last; } |
---|
33 | int operator[] ( int ) const; |
---|
34 | }; |
---|
35 | |
---|
36 | ostream& operator<< ( ostream &, const IteratedFor & ); |
---|
37 | |
---|
38 | #endif /* INCL_ITERFOR_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.