diff -r 57c316cb868b -r 5365600a7a5c lemon/bits/path_dump.h --- a/lemon/bits/path_dump.h Wed Feb 07 18:07:10 2007 +0000 +++ b/lemon/bits/path_dump.h Sun Feb 11 16:34:51 2007 +0000 @@ -1,3 +1,4 @@ + /* -*- C++ -*- * * This file is a part of LEMON, a generic C++ optimization library @@ -49,32 +50,32 @@ return predMap[target] != INVALID; } - class RevIt { + class RevEdgeIt { public: - RevIt() {} - RevIt(Invalid) : path(0), current(INVALID) {} - RevIt(const PredMapPath& _path) + RevEdgeIt() {} + RevEdgeIt(Invalid) : path(0), current(INVALID) {} + RevEdgeIt(const PredMapPath& _path) : path(&_path), current(_path.target) {} operator const typename Graph::Edge() const { return path->predMap[current]; } - RevIt& operator++() { + RevEdgeIt& operator++() { current = path->graph.source(path->predMap[current]); if (path->predMap[current] == INVALID) current = INVALID; return *this; } - bool operator==(const RevIt& e) const { + bool operator==(const RevEdgeIt& e) const { return current == e.current; } - bool operator!=(const RevIt& e) const { + bool operator!=(const RevEdgeIt& e) const { return current != e.current; } - bool operator<(const RevIt& e) const { + bool operator<(const RevEdgeIt& e) const { return current < e.current; } @@ -121,18 +122,18 @@ return source != target; } - class RevIt { + class RevEdgeIt { public: - RevIt() {} - RevIt(Invalid) : path(0), current(INVALID) {} - RevIt(const PredMatrixMapPath& _path) + RevEdgeIt() {} + RevEdgeIt(Invalid) : path(0), current(INVALID) {} + RevEdgeIt(const PredMatrixMapPath& _path) : path(&_path), current(_path.target) {} operator const typename Graph::Edge() const { return path->predMatrixMap(path->source, current); } - RevIt& operator++() { + RevEdgeIt& operator++() { current = path->graph.source(path->predMatrixMap(path->source, current)); if (path->predMatrixMap(path->source, current) == INVALID) @@ -140,15 +141,15 @@ return *this; } - bool operator==(const RevIt& e) const { + bool operator==(const RevEdgeIt& e) const { return current == e.current; } - bool operator!=(const RevIt& e) const { + bool operator!=(const RevEdgeIt& e) const { return current != e.current; } - bool operator<(const RevIt& e) const { + bool operator<(const RevEdgeIt& e) const { return current < e.current; }