Changeset 256:c760d691fe3c in lemon for lemon/bits/base_extender.h
 Timestamp:
 09/02/08 22:27:19 (16 years ago)
 Branch:
 default
 Children:
 258:0310c8984732, 346:ada5f74d1c9e
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/bits/base_extender.h
r220 r256 60 60 Arc() {} 61 61 62 // /Invalid arc constructor62 // Invalid arc constructor 63 63 Arc(Invalid i) : Edge(i), forward(true) {} 64 64 … … 75 75 }; 76 76 77 78 79 using Parent::source; 80 81 /// Source of the given Arc. 77 /// First node of the edge 78 Node u(const Edge &e) const { 79 return Parent::source(e); 80 } 81 82 /// Source of the given arc 82 83 Node source(const Arc &e) const { 83 84 return e.forward ? Parent::source(e) : Parent::target(e); 84 85 } 85 86 86 using Parent::target; 87 88 /// Target of the given Arc. 87 /// Second node of the edge 88 Node v(const Edge &e) const { 89 return Parent::target(e); 90 } 91 92 /// Target of the given arc 89 93 Node target(const Arc &e) const { 90 94 return e.forward ? Parent::target(e) : Parent::source(e); … … 93 97 /// \brief Directed arc from an edge. 94 98 /// 95 /// Returns a directed arc corresponding to the specified Edge.96 /// If the given bool is true the given edge and the97 /// returned arc have the same source node.98 static Arc direct(const Edge & ue, bool d) {99 return Arc( ue, d);100 } 101 102 /// Returns whether the given directed arc is same orientation as the103 /// corresponding edge.99 /// Returns a directed arc corresponding to the specified edge. 100 /// If the given bool is true, the first node of the given edge and 101 /// the source node of the returned arc are the same. 102 static Arc direct(const Edge &e, bool d) { 103 return Arc(e, d); 104 } 105 106 /// Returns whether the given directed arc has the same orientation 107 /// as the corresponding edge. 104 108 /// 105 109 /// \todo reference to the corresponding point of the undirected digraph 106 110 /// concept. "What does the direction of an edge mean?" 107 static bool direction(const Arc &e) { return e.forward; } 108 111 static bool direction(const Arc &a) { return a.forward; } 109 112 110 113 using Parent::first; … … 229 232 return Parent::maxArcId(); 230 233 } 231 232 234 233 235 int arcNum() const {
Note: See TracChangeset
for help on using the changeset viewer.