# HG changeset patch # User deba # Date 1123766199 0 # Node ID 9c98841eda96e65460df41a73ebe59a00f62a77d # Parent 574f8a3f0971c82811b8c51cee0bfde347a91dfb Ordering in the graph concept. diff -r 574f8a3f0971 -r 9c98841eda96 lemon/concept/graph.h --- a/lemon/concept/graph.h Thu Aug 11 13:15:03 2005 +0000 +++ b/lemon/concept/graph.h Thu Aug 11 13:16:39 2005 +0000 @@ -176,6 +176,18 @@ /// bool operator!=(Node) const { return true; } + /// Artificial ordering operator. + + /// To allow the use of graph descriptors as key type in std::map or + /// similar associative container we require this. + /// + /// \note This operator only have to define some strict ordering of + /// the items; this order has nothing to do with the iteration + /// ordering of the items. + /// + /// \bug This is a technical requirement. Do we really need this? + bool operator<(Node) const { return false; } + }; /// This iterator goes through each node. @@ -255,6 +267,18 @@ /// \sa operator==(Edge n) /// bool operator!=(Edge) const { return true; } + + /// Artificial ordering operator. + + /// To allow the use of graph descriptors as key type in std::map or + /// similar associative container we require this. + /// + /// \note This operator only have to define some strict ordering of + /// the items; this order has nothing to do with the iteration + /// ordering of the items. + /// + /// \bug This is a technical requirement. Do we really need this? + bool operator<(Edge) const { return false; } }; /// This iterator goes trough the outgoing edges of a node.