SheafSystem  0.0.0.0
subposet_member_iterator.h
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
18 // Interface for class subposet_member_iterator
19 
20 #ifndef SUBPOSET_MEMBER_ITERATOR_H
21 #define SUBPOSET_MEMBER_ITERATOR_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef POSET_MEMBER_ITERATOR_H
28 #include "SheafSystem/poset_member_iterator.h"
29 #endif
30 
31 #ifndef INDEX_ITERATOR_H
32 #include "SheafSystem/index_iterator.h"
33 #endif
34 
35 namespace sheaf
36 {
37 
38 class subposet;
39 
44 class SHEAF_DLL_SPEC subposet_member_iterator : public poset_member_iterator
45 {
46 
47 public:
48 
53  subposet_member_iterator(const subposet& xsubposet);
54 
59 
63  bool invariant() const;
64 
68  bool is_done() const;
69 
73  bool is_last() const;
74 
78  void next();
79 
84  void reset();
85 
91  void reset(const subposet* xsubposet);
92 
97  subposet* domain() const;
98 
99 protected:
100 
105 
110 
117 
122 
126  void initialize_filter();
127 
131  virtual subposet_member_iterator& operator=(const abstract_poset_member& xother);
132 
136  subposet_member_iterator& operator=(const subposet_member_iterator& xother);
137 
138 
139 };
140 
141 } // namespace sheaf
142 
143 #endif // ifndef SUBPOSET_MEMBER_ITERATOR_H
A client handle for a subposet.
Definition: subposet.h:86
index_iterator _itr
Index iterator for characteristic function of domain.
subposet * _domain
Subposet being iterated over.
zn_to_bool * _filter
The filter; defined by what it passes, not what it blocks, that is, the iterator will only return mem...
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
Definition: zn_to_bool.h:52
Iterates over the subset of Zn defined by the characteristic function host().
Namespace for the sheaves component of the sheaf system.
An abstract client handle for a member of a poset.
bool _new_filter
True if `this' allocated a new filter.