Changeset 1158:29961fa390a3 in lemon-0.x for src/lemon/undir_graph_extender.h
- Timestamp:
- 02/20/05 02:02:07 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1559
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/undir_graph_extender.h
r1060 r1158 45 45 public: 46 46 Edge() {} 47 /// Construct a direct edge from undirect edge and a direction. 47 48 /// \brief Directed edge from undirected edge and a direction. 49 /// 50 /// This constructor is not a part of the concept interface of 51 /// undirected graph, so please avoid using it if possible! 48 52 Edge(const UndirEdge &ue, bool _forward) : 49 UndirEdge(ue), forward(_forward) {} 53 UndirEdge(ue), forward(_forward) {} 54 55 /// \brief Directed edge from undirected edge and a source node. 56 /// 57 /// Constructs a directed edge from undirected edge and a source node. 58 /// 59 /// \note You have to specify the graph for this constructor. 60 Edge(const Graph &g, const UndirEdge &ue, const Node &n) : 61 UndirEdge(ue) { forward = (g.source(ue) == n); } 62 50 63 /// Invalid edge constructor 51 64 Edge(Invalid i) : UndirEdge(i), forward(true) {} … … 64 77 65 78 66 /// \brief Returns theEdge of opposite direction.67 /// 68 /// \bug Is this a good name for this? Or "reverse" is better?79 /// \brief Edge of opposite direction. 80 /// 81 /// Returns the Edge of opposite direction. 69 82 Edge opposite(const Edge &e) const { 70 83 return Edge(e,!e.forward); … … 118 131 } 119 132 133 /// Directed edge from an undirected edge and a source node. 134 /// 135 /// Returns a (directed) Edge corresponding to the specified UndirEdge 136 /// and source Node. 137 /// 138 ///\todo Do we need this? 139 /// 140 ///\todo Better name... 141 Edge edgeWithSource(const UndirEdge &ue, const Node &s) const { 142 return Edge(*this, eu, s); 143 } 120 144 121 145 using Parent::first;
Note: See TracChangeset
for help on using the changeset viewer.