MCPcopy Create free account
hub / github.com/Singular/Singular / iterator

Class iterator

gfanlib/gfanlib_zcone.cpp:233–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 int tableSize;
232 public:
233 class iterator
234 {
235 class MyHashMap &hashMap;
236 int index; // having index==-1 means that we are before/after the elements.
237 std::set<ZVector>::iterator i;
238 public:
239 bool operator++()
240 {
241 if(index==-1)goto search;
242 i++;
243 while(i==hashMap.container[index].end())
244 {
245 search:
246 index++;
247 if(index>=hashMap.tableSize){
248 index=-1;
249 return false;
250 }
251 i=hashMap.container[index].begin();
252 }
253 return true;
254 }
255 ZVector const & operator*()const
256 {
257 return *i;
258 }
259 ZVector operator*()
260 {
261 return *i;
262 }
263 iterator(MyHashMap &hashMap_):
264 hashMap(hashMap_)
265 {
266 index=-1;
267 }
268 };
269 unsigned int function(const ZVector &v)
270 {
271 unsigned int ret=0;

Callers 4

beginMethod · 0.85
endMethod · 0.85
beginMethod · 0.85
endMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected