[Lemon-commits] [lemon_svn] deba: r2130 - hugo/trunk/lemon/concept
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:50:23 CET 2006
Author: deba
Date: Thu Aug 11 15:16:39 2005
New Revision: 2130
Modified:
hugo/trunk/lemon/concept/graph.h
Log:
Ordering in the graph concept.
Modified: hugo/trunk/lemon/concept/graph.h
==============================================================================
--- hugo/trunk/lemon/concept/graph.h (original)
+++ hugo/trunk/lemon/concept/graph.h Thu Aug 11 15:16:39 2005
@@ -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.
More information about the Lemon-commits
mailing list