lemon/concepts/path.h
changeset 2362 eb37b9774ef6
parent 2335 27aa03cd3121
child 2391 14a343be7a5a
equal deleted inserted replaced
1:158c142651c8 2:eef475899e29
   169       > {
   169       > {
   170         void constraints() {
   170         void constraints() {
   171           int l = p.length();
   171           int l = p.length();
   172           int e = p.empty();
   172           int e = p.empty();
   173 
   173 
   174           typename _Path::RevIt id, ii(INVALID), i(p);
   174           typename _Path::RevEdgeIt id, ii(INVALID), i(p);
   175 
   175 
   176           ++i;
   176           ++i;
   177           typename _Graph::Edge ed = i;
   177           typename _Graph::Edge ed = i;
   178 
   178 
   179           e = (i == ii);
   179           e = (i == ii);
   230       bool empty() const { return true;}
   230       bool empty() const { return true;}
   231 
   231 
   232       /// \brief Forward or reverse dumping
   232       /// \brief Forward or reverse dumping
   233       ///
   233       ///
   234       /// If the RevPathTag is defined and true then reverse dumping
   234       /// If the RevPathTag is defined and true then reverse dumping
   235       /// is provided in the path proxy. In this case instead of the
   235       /// is provided in the path dumper. In this case instead of the
   236       /// EdgeIt the RevIt iterator should be implemented in the
   236       /// EdgeIt the RevEdgeIt iterator should be implemented in the
   237       /// proxy.
   237       /// dumper.
   238       typedef False RevPathTag;
   238       typedef False RevPathTag;
   239 
   239 
   240       /// \brief Lemon style iterator for path edges
   240       /// \brief Lemon style iterator for path edges
   241       ///
   241       ///
   242       /// This class is used to iterate on the edges of the paths.
   242       /// This class is used to iterate on the edges of the paths.
   266 
   266 
   267       /// \brief Lemon style iterator for path edges
   267       /// \brief Lemon style iterator for path edges
   268       ///
   268       ///
   269       /// This class is used to iterate on the edges of the paths in
   269       /// This class is used to iterate on the edges of the paths in
   270       /// reverse direction.
   270       /// reverse direction.
   271       class RevIt {
   271       class RevEdgeIt {
   272       public:
   272       public:
   273 	/// Default constructor
   273 	/// Default constructor
   274 	RevIt() {}
   274 	RevEdgeIt() {}
   275 	/// Invalid constructor
   275 	/// Invalid constructor
   276 	RevIt(Invalid) {}
   276 	RevEdgeIt(Invalid) {}
   277 	/// Constructor for first edge
   277 	/// Constructor for first edge
   278 	RevIt(const PathDumper &) {}
   278 	RevEdgeIt(const PathDumper &) {}
   279 
   279 
   280         /// Conversion to Edge
   280         /// Conversion to Edge
   281 	operator Edge() const { return INVALID; }
   281 	operator Edge() const { return INVALID; }
   282 
   282 
   283 	/// Next edge
   283 	/// Next edge
   284 	RevIt& operator++() {return *this;}
   284 	RevEdgeIt& operator++() {return *this;}
   285 
   285 
   286 	/// Comparison operator
   286 	/// Comparison operator
   287 	bool operator==(const RevIt&) const {return true;}
   287 	bool operator==(const RevEdgeIt&) const {return true;}
   288 	/// Comparison operator
   288 	/// Comparison operator
   289 	bool operator!=(const RevIt&) const {return true;}
   289 	bool operator!=(const RevEdgeIt&) const {return true;}
   290  	/// Comparison operator
   290  	/// Comparison operator
   291  	bool operator<(const RevIt&) const {return false;}
   291  	bool operator<(const RevEdgeIt&) const {return false;}
   292 
   292 
   293       };
   293       };
   294 
   294 
   295       template <typename _Path>
   295       template <typename _Path>
   296       struct Constraints {
   296       struct Constraints {