Changeset 209:765619b7cbb2 in lemon-1.2 for lemon/bits/path_dump.h
- Timestamp:
- 07/13/08 20:51:02 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bits/path_dump.h
r100 r209 1 /* -*- C++-*-1 /* -*- mode: C++; indent-tabs-mode: nil; -*- 2 2 * 3 * This file is a part of LEMON, a generic C++ optimization library 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 5 * Copyright (C) 2003-2008 … … 54 54 RevArcIt() {} 55 55 RevArcIt(Invalid) : path(0), current(INVALID) {} 56 RevArcIt(const PredMapPath& _path) 56 RevArcIt(const PredMapPath& _path) 57 57 : path(&_path), current(_path.target) { 58 58 if (path->predMap[current] == INVALID) current = INVALID; … … 69 69 } 70 70 71 bool operator==(const RevArcIt& e) const { 72 return current == e.current; 71 bool operator==(const RevArcIt& e) const { 72 return current == e.current; 73 73 } 74 74 75 75 bool operator!=(const RevArcIt& e) const { 76 return current != e.current; 76 return current != e.current; 77 77 } 78 78 79 bool operator<(const RevArcIt& e) const { 80 return current < e.current; 79 bool operator<(const RevArcIt& e) const { 80 return current < e.current; 81 81 } 82 82 83 83 private: 84 84 const PredMapPath* path; … … 102 102 typedef _PredMatrixMap PredMatrixMap; 103 103 104 PredMatrixMapPath(const Digraph& _digraph, 104 PredMatrixMapPath(const Digraph& _digraph, 105 105 const PredMatrixMap& _predMatrixMap, 106 typename Digraph::Node _source, 106 typename Digraph::Node _source, 107 107 typename Digraph::Node _target) 108 : digraph(_digraph), predMatrixMap(_predMatrixMap), 108 : digraph(_digraph), predMatrixMap(_predMatrixMap), 109 109 source(_source), target(_target) {} 110 110 … … 128 128 RevArcIt() {} 129 129 RevArcIt(Invalid) : path(0), current(INVALID) {} 130 RevArcIt(const PredMatrixMapPath& _path) 130 RevArcIt(const PredMatrixMapPath& _path) 131 131 : path(&_path), current(_path.target) { 132 if (path->predMatrixMap(path->source, current) == INVALID) 132 if (path->predMatrixMap(path->source, current) == INVALID) 133 133 current = INVALID; 134 134 } … … 139 139 140 140 RevArcIt& operator++() { 141 current = 141 current = 142 142 path->digraph.source(path->predMatrixMap(path->source, current)); 143 if (path->predMatrixMap(path->source, current) == INVALID) 143 if (path->predMatrixMap(path->source, current) == INVALID) 144 144 current = INVALID; 145 145 return *this; 146 146 } 147 147 148 bool operator==(const RevArcIt& e) const { 149 return current == e.current; 148 bool operator==(const RevArcIt& e) const { 149 return current == e.current; 150 150 } 151 151 152 152 bool operator!=(const RevArcIt& e) const { 153 return current != e.current; 153 return current != e.current; 154 154 } 155 155 156 bool operator<(const RevArcIt& e) const { 157 return current < e.current; 156 bool operator<(const RevArcIt& e) const { 157 return current < e.current; 158 158 } 159 159 160 160 private: 161 161 const PredMatrixMapPath* path;
Note: See TracChangeset
for help on using the changeset viewer.