Changeset 1909:2d806130e700 in lemon0.x for lemon/euler.h
 Timestamp:
 01/26/06 16:42:13 (14 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2484
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/euler.h
r1875 r1909 125 125 ///Euler tour of \c g. 126 126 ///\code 127 /// for(U ndirEulerIt<UndirListGraph> e(g),e!=INVALID;++e) {128 /// std::cout << g.id(U ndirEdge(e)) << std::eol;127 /// for(UEulerIt<ListUGraph> e(g),e!=INVALID;++e) { 128 /// std::cout << g.id(UEdge(e)) << std::eol; 129 129 /// } 130 130 ///\endcode 131 131 ///Although the iterator provides an Euler tour of an undirected graph, 132 ///in order to indicate the direction of the tour, U ndirEulerIt132 ///in order to indicate the direction of the tour, UEulerIt 133 133 ///returns directed edges (that convert to the undirected ones, of course). 134 134 /// … … 136 136 ///\todo Test required 137 137 template<class Graph> 138 class U ndirEulerIt138 class UEulerIt 139 139 { 140 140 typedef typename Graph::Node Node; … … 147 147 const Graph &g; 148 148 typename Graph::NodeMap<OutEdgeIt> nedge; 149 typename Graph::U ndirEdgeMap<bool> visited;149 typename Graph::UEdgeMap<bool> visited; 150 150 std::list<Edge> euler; 151 151 … … 157 157 ///\param start The starting point of the tour. If it is not given 158 158 /// the tour will start from the first node. 159 U ndirEulerIt(const Graph &_g,typename Graph::Node start=INVALID)159 UEulerIt(const Graph &_g,typename Graph::Node start=INVALID) 160 160 : g(_g), nedge(g), visited(g,false) 161 161 { … … 176 176 177 177 ///Next edge of the tour 178 U ndirEulerIt &operator++() {178 UEulerIt &operator++() { 179 179 Node s=g.target(euler.front()); 180 180 euler.pop_front(); … … 197 197 198 198 ///\warning This incrementation 199 ///returns an \c Edge, not an \ref U ndirEulerIt, as one may199 ///returns an \c Edge, not an \ref UEulerIt, as one may 200 200 ///expect. 201 201 Edge operator++(int) … … 225 225 bool 226 226 #else 227 typename enable_if<typename Graph::U ndirTag,bool>::type227 typename enable_if<typename Graph::UTag,bool>::type 228 228 euler(const Graph &g) 229 229 { … … 233 233 } 234 234 template<class Graph> 235 typename disable_if<typename Graph::U ndirTag,bool>::type235 typename disable_if<typename Graph::UTag,bool>::type 236 236 #endif 237 237 euler(const Graph &g)
Note: See TracChangeset
for help on using the changeset viewer.