[Lemon-commits] [lemon_svn] deba: r2062 - hugo/trunk/lemon/concept
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:49:51 CET 2006
Author: deba
Date: Mon Jul 18 17:03:55 2005
New Revision: 2062
Modified:
hugo/trunk/lemon/concept/graph.h
hugo/trunk/lemon/concept/graph_component.h
Log:
Fix concepts and constraints
Modified: hugo/trunk/lemon/concept/graph.h
==============================================================================
--- hugo/trunk/lemon/concept/graph.h (original)
+++ hugo/trunk/lemon/concept/graph.h Mon Jul 18 17:03:55 2005
@@ -406,6 +406,75 @@
///Gives back the source node of an edge.
///
Node source(Edge) const { return INVALID; }
+
+ /// Gives back the first Node in the iterating order.
+
+ /// Gives back the first Node in the iterating order.
+ ///
+ void first(Node&) const {}
+
+ /// Gives back the next Node in the iterating order.
+
+ /// Gives back the next Node in the iterating order.
+ ///
+ void next(Node&) const {}
+
+ /// Gives back the first Edge in the iterating order.
+
+ /// Gives back the first Edge in the iterating order.
+ ///
+ void first(Edge&) const {}
+ /// Gives back the next Edge in the iterating order.
+
+ /// Gives back the next Edge in the iterating order.
+ ///
+ void next(Edge&) const {}
+
+
+ /// Gives back the first of the Edges point to the given Node.
+
+ /// Gives back the first of the Edges point to the given Node.
+ ///
+ void firstIn(Edge&, const Node&) const {}
+
+ /// Gives back the next of the Edges points to the given Node.
+
+
+ /// Gives back the next of the Edges points to the given Node.
+ ///
+ void nextIn(Edge&) const {}
+
+ /// Gives back the first of the Edges start from the given Node.
+
+ /// Gives back the first of the Edges start from the given Node.
+ ///
+ void firstOut(Edge&, const Node&) const {}
+
+ /// Gives back the next of the Edges start from the given Node.
+
+ /// Gives back the next of the Edges start from the given Node.
+ ///
+ void nextOut(Edge&) const {}
+
+ /// \brief The base node of the iterator.
+ ///
+ /// Gives back the base node of the iterator.
+ Node baseNode(const InEdgeIt&) const { return INVALID; }
+
+ /// \brief The running node of the iterator.
+ ///
+ /// Gives back the running node of the iterator.
+ Node runningNode(const InEdgeIt&) const { return INVALID; }
+
+ /// \brief The base node of the iterator.
+ ///
+ /// Gives back the base node of the iterator.
+ Node baseNode(const OutEdgeIt&) const { return INVALID; }
+
+ /// \brief The running node of the iterator.
+ ///
+ /// Gives back the running node of the iterator.
+ Node runningNode(const OutEdgeIt&) const { return INVALID; }
/// Read write map of the nodes to type \c T.
/// \ingroup concept
Modified: hugo/trunk/lemon/concept/graph_component.h
==============================================================================
--- hugo/trunk/lemon/concept/graph_component.h (original)
+++ hugo/trunk/lemon/concept/graph_component.h Mon Jul 18 17:03:55 2005
@@ -677,20 +677,41 @@
/// This iterator goes trough the \e outgoing edges of a certain node
/// of a graph.
typedef GraphIncIterator<Graph, Edge, 'o'> OutEdgeIt;
- };
+
+ /// \brief The base node of the iterator.
+ ///
+ /// Gives back the base node of the iterator.
+ Node baseNode(const InEdgeIt&) const { return INVALID; }
+
+ /// \brief The running node of the iterator.
+ ///
+ /// Gives back the running node of the iterator.
+ Node runningNode(const InEdgeIt&) const { return INVALID; }
+
+ /// \brief The base node of the iterator.
+ ///
+ /// Gives back the base node of the iterator.
+ Node baseNode(const OutEdgeIt&) const { return INVALID; }
+
+ /// \brief The running node of the iterator.
+ ///
+ /// Gives back the running node of the iterator.
+ Node runningNode(const OutEdgeIt&) const { return INVALID; }
+
- template <typename _Graph>
- struct Constraints {
- void constraints() {
- checkConcept< BaseGraphComponent, _Graph>();
-
- checkConcept<GraphIterator<_Graph, typename _Graph::Edge>,
- typename _Graph::EdgeIt >();
- checkConcept<GraphIterator<_Graph, typename _Graph::Node>,
- typename _Graph::NodeIt >();
- checkConcept<GraphIncIterator<_Graph>, typename _Graph::InEdgeIt >();
- checkConcept<GraphIncIterator<_Graph>, typename _Graph::OutEdgeIt >();
- }
+ template <typename _Graph>
+ struct Constraints {
+ void constraints() {
+ checkConcept< BaseGraphComponent, _Graph>();
+
+ checkConcept<GraphIterator<_Graph, typename _Graph::Edge>,
+ typename _Graph::EdgeIt >();
+ checkConcept<GraphIterator<_Graph, typename _Graph::Node>,
+ typename _Graph::NodeIt >();
+ checkConcept<GraphIncIterator<_Graph>, typename _Graph::InEdgeIt>();
+ checkConcept<GraphIncIterator<_Graph>, typename _Graph::OutEdgeIt>();
+ }
+ };
};
/// An empty alteration notifier base graph class.
More information about the Lemon-commits
mailing list