Ordering in the graph concept.
1.1 --- a/lemon/concept/graph.h Thu Aug 11 13:15:03 2005 +0000
1.2 +++ b/lemon/concept/graph.h Thu Aug 11 13:16:39 2005 +0000
1.3 @@ -176,6 +176,18 @@
1.4 ///
1.5 bool operator!=(Node) const { return true; }
1.6
1.7 + /// Artificial ordering operator.
1.8 +
1.9 + /// To allow the use of graph descriptors as key type in std::map or
1.10 + /// similar associative container we require this.
1.11 + ///
1.12 + /// \note This operator only have to define some strict ordering of
1.13 + /// the items; this order has nothing to do with the iteration
1.14 + /// ordering of the items.
1.15 + ///
1.16 + /// \bug This is a technical requirement. Do we really need this?
1.17 + bool operator<(Node) const { return false; }
1.18 +
1.19 };
1.20
1.21 /// This iterator goes through each node.
1.22 @@ -255,6 +267,18 @@
1.23 /// \sa operator==(Edge n)
1.24 ///
1.25 bool operator!=(Edge) const { return true; }
1.26 +
1.27 + /// Artificial ordering operator.
1.28 +
1.29 + /// To allow the use of graph descriptors as key type in std::map or
1.30 + /// similar associative container we require this.
1.31 + ///
1.32 + /// \note This operator only have to define some strict ordering of
1.33 + /// the items; this order has nothing to do with the iteration
1.34 + /// ordering of the items.
1.35 + ///
1.36 + /// \bug This is a technical requirement. Do we really need this?
1.37 + bool operator<(Edge) const { return false; }
1.38 };
1.39
1.40 /// This iterator goes trough the outgoing edges of a node.