lemon/bits/path_dump.h
changeset 2506 216c6bd5c18c
parent 2391 14a343be7a5a
child 2553 bfced05fa852
equal deleted inserted replaced
2:a5ca90e953b9 3:89e7cc45d55e
    52     class RevEdgeIt {
    52     class RevEdgeIt {
    53     public:
    53     public:
    54       RevEdgeIt() {}
    54       RevEdgeIt() {}
    55       RevEdgeIt(Invalid) : path(0), current(INVALID) {}
    55       RevEdgeIt(Invalid) : path(0), current(INVALID) {}
    56       RevEdgeIt(const PredMapPath& _path) 
    56       RevEdgeIt(const PredMapPath& _path) 
    57         : path(&_path), current(_path.target) {}
    57         : path(&_path), current(_path.target) {
       
    58         if (path->predMap[current] == INVALID) current = INVALID;
       
    59       }
    58 
    60 
    59       operator const typename Graph::Edge() const {
    61       operator const typename Graph::Edge() const {
    60         return path->predMap[current];
    62         return path->predMap[current];
    61       }
    63       }
    62 
    64 
   124     class RevEdgeIt {
   126     class RevEdgeIt {
   125     public:
   127     public:
   126       RevEdgeIt() {}
   128       RevEdgeIt() {}
   127       RevEdgeIt(Invalid) : path(0), current(INVALID) {}
   129       RevEdgeIt(Invalid) : path(0), current(INVALID) {}
   128       RevEdgeIt(const PredMatrixMapPath& _path) 
   130       RevEdgeIt(const PredMatrixMapPath& _path) 
   129         : path(&_path), current(_path.target) {}
   131         : path(&_path), current(_path.target) {
       
   132         if (path->predMatrixMap(path->source, current) == INVALID) 
       
   133           current = INVALID;
       
   134       }
   130 
   135 
   131       operator const typename Graph::Edge() const {
   136       operator const typename Graph::Edge() const {
   132         return path->predMatrixMap(path->source, current);
   137         return path->predMatrixMap(path->source, current);
   133       }
   138       }
   134 
   139