Boost logo

Boost-Commit :

From: asutton_at_[hidden]
Date: 2008-08-08 10:20:01


Author: asutton
Date: 2008-08-08 10:20:00 EDT (Fri, 08 Aug 2008)
New Revision: 48029
URL: http://svn.boost.org/trac/boost/changeset/48029

Log:
Reworking some of the accessors in the directed edge.

Text files modified:
   sandbox/SOC/2008/graphs/trunk/boost/graphs/directed_edge.hpp | 10 +++++++++-
   1 files changed, 9 insertions(+), 1 deletions(-)

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/directed_edge.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/directed_edge.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/directed_edge.hpp 2008-08-08 10:20:00 EDT (Fri, 08 Aug 2008)
@@ -49,7 +49,9 @@
 
     /** @name End Points
      * Provide access to the source and target of the directed edge. The
- * opposite member provides parity with undirected edge type.
+ * opposite member provides parity with undirected edge type. The first and
+ * second accessors provide direction-free semantics, but return the source
+ * and target() directly.
      */
     //@{
     inline vertex_descriptor source() const
@@ -58,6 +60,12 @@
     inline vertex_descriptor target() const
     { return ends.second; }
 
+ inline vertex_descriptor first() const
+ { return ends.first; }
+
+ inline vertex_descriptor second() const
+ { return ends.second; }
+
     inline vertex_descriptor opposite(vertex_descriptor v) const
     { return v == source() ? target() : source(); }
     //@}


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk