COIN-OR::LEMON - Graph Library

source: lemon-0.x/lemon/concept/ugraph.h @ 2163:bef3457be038

Last change on this file since 2163:bef3457be038 was 2163:bef3457be038, checked in by Balazs Dezso, 14 years ago

Improving UGraph and BpUGraph concept classes

File size: 23.0 KB
RevLine 
[962]1/* -*- C++ -*-
2 *
[1956]3 * This file is a part of LEMON, a generic C++ optimization library
[962]4 *
[1956]5 * Copyright (C) 2003-2006
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
[962]8 *
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
12 *
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
15 * purpose.
16 *
17 */
18
[1030]19///\ingroup graph_concepts
[962]20///\file
[2111]21///\brief The concept of the undirected graphs.
[962]22
23
[1910]24#ifndef LEMON_CONCEPT_UGRAPH_H
25#define LEMON_CONCEPT_UGRAPH_H
[962]26
[2126]27#include <lemon/concept/graph_components.h>
[1620]28#include <lemon/concept/graph.h>
[1993]29#include <lemon/bits/utility.h>
[962]30
31namespace lemon {
32  namespace concept {
33
[1620]34    /// \addtogroup graph_concepts
35    /// @{
36
37
[2163]38    /// \brief Class describing the concept of Undirected Graphs.
39    ///
[1030]40    /// This class describes the common interface of all Undirected
41    /// Graphs.
42    ///
43    /// As all concept describing classes it provides only interface
44    /// without any sensible implementation. So any algorithm for
45    /// undirected graph should compile with this class, but it will not
[2163]46    /// run properly, of course.
[1030]47    ///
[2163]48    /// The LEMON undirected graphs also fulfill the concept of
49    /// directed graphs (\ref lemon::concept::Graph "Graph
50    /// Concept"). Each undirected edges can be seen as two opposite
51    /// directed edge and consequently the undirected graph can be
52    /// seen as the direceted graph of these directed edges. The
53    /// UGraph has the UEdge inner class for the undirected edges and
54    /// the Edge type for the directed edges. The Edge type is
55    /// convertible to UEdge or inherited from it so from a directed
56    /// edge we can get the represented undirected edge.
[1627]57    ///
[2163]58    /// In the sense of the LEMON each undirected edge has a default
59    /// direction (it should be in every computer implementation,
60    /// because the order of undirected edge's nodes defines an
61    /// orientation). With the default orientation we can define that
62    /// the directed edge is forward or backward directed. With the \c
63    /// direction() and \c direct() function we can get the direction
64    /// of the directed edge and we can direct an undirected edge.
65    ///
66    /// The UEdgeIt is an iterator for the undirected edges. We can use
67    /// the UEdgeMap to map values for the undirected edges. The InEdgeIt and
68    /// OutEdgeIt iterates on the same undirected edges but with opposite
69    /// direction. The IncEdgeIt iterates also on the same undirected edges
70    /// as the OutEdgeIt and InEdgeIt but it is not convertible to Edge just
71    /// to UEdge. 
[1909]72    class UGraph {
[1022]73    public:
[2163]74      /// \brief The undirected graph should be tagged by the
75      /// UndirectedTag.
[1448]76      ///
[2163]77      /// The undirected graph should be tagged by the UndirectedTag. This
78      /// tag helps the enable_if technics to make compile time
79      /// specializations for undirected graphs. 
[1979]80      typedef True UndirectedTag;
[1022]81
[1669]82      /// \brief The base type of node iterators,
[1627]83      /// or in other words, the trivial node iterator.
[1669]84      ///
[1627]85      /// This is the base type of each node iterator,
86      /// thus each kind of node iterator converts to this.
87      /// More precisely each kind of node iterator should be inherited
88      /// from the trivial node iterator.
89      class Node {
90      public:
91        /// Default constructor
92
93        /// @warning The default constructor sets the iterator
94        /// to an undefined value.
95        Node() { }
96        /// Copy constructor.
97
98        /// Copy constructor.
99        ///
100        Node(const Node&) { }
101
102        /// Invalid constructor \& conversion.
103
104        /// This constructor initializes the iterator to be invalid.
105        /// \sa Invalid for more details.
106        Node(Invalid) { }
107        /// Equality operator
108
109        /// Two iterators are equal if and only if they point to the
110        /// same object or both are invalid.
111        bool operator==(Node) const { return true; }
112
113        /// Inequality operator
114       
115        /// \sa operator==(Node n)
116        ///
117        bool operator!=(Node) const { return true; }
118
119        /// Artificial ordering operator.
120       
121        /// To allow the use of graph descriptors as key type in std::map or
122        /// similar associative container we require this.
123        ///
124        /// \note This operator only have to define some strict ordering of
125        /// the items; this order has nothing to do with the iteration
126        /// ordering of the items.
127        bool operator<(Node) const { return false; }
128
129      };
130   
131      /// This iterator goes through each node.
132
133      /// This iterator goes through each node.
134      /// Its usage is quite simple, for example you can count the number
135      /// of nodes in graph \c g of type \c Graph like this:
[1946]136      ///\code
[1627]137      /// int count=0;
138      /// for (Graph::NodeIt n(g); n!=INVALID; ++n) ++count;
[1946]139      ///\endcode
[1627]140      class NodeIt : public Node {
141      public:
142        /// Default constructor
143
144        /// @warning The default constructor sets the iterator
145        /// to an undefined value.
146        NodeIt() { }
147        /// Copy constructor.
148       
149        /// Copy constructor.
150        ///
151        NodeIt(const NodeIt& n) : Node(n) { }
152        /// Invalid constructor \& conversion.
153
154        /// Initialize the iterator to be invalid.
155        /// \sa Invalid for more details.
156        NodeIt(Invalid) { }
157        /// Sets the iterator to the first node.
158
159        /// Sets the iterator to the first node of \c g.
160        ///
[1909]161        NodeIt(const UGraph&) { }
[1627]162        /// Node -> NodeIt conversion.
163
164        /// Sets the iterator to the node of \c the graph pointed by
165        /// the trivial iterator.
166        /// This feature necessitates that each time we
167        /// iterate the edge-set, the iteration order is the same.
[1909]168        NodeIt(const UGraph&, const Node&) { }
[1627]169        /// Next node.
170
171        /// Assign the iterator to the next node.
172        ///
173        NodeIt& operator++() { return *this; }
174      };
175   
176   
[1620]177      /// The base type of the undirected edge iterators.
[1627]178
[1620]179      /// The base type of the undirected edge iterators.
180      ///
[1909]181      class UEdge {
[1620]182      public:
183        /// Default constructor
[1030]184
[1620]185        /// @warning The default constructor sets the iterator
186        /// to an undefined value.
[1909]187        UEdge() { }
[1620]188        /// Copy constructor.
[1030]189
[1620]190        /// Copy constructor.
191        ///
[1909]192        UEdge(const UEdge&) { }
[1620]193        /// Initialize the iterator to be invalid.
[1030]194
[1620]195        /// Initialize the iterator to be invalid.
196        ///
[1909]197        UEdge(Invalid) { }
[1620]198        /// Equality operator
[1030]199
[1620]200        /// Two iterators are equal if and only if they point to the
201        /// same object or both are invalid.
[1909]202        bool operator==(UEdge) const { return true; }
[1620]203        /// Inequality operator
[1030]204
[1909]205        /// \sa operator==(UEdge n)
[1620]206        ///
[1909]207        bool operator!=(UEdge) const { return true; }
[1030]208
[1627]209        /// Artificial ordering operator.
210       
211        /// To allow the use of graph descriptors as key type in std::map or
212        /// similar associative container we require this.
213        ///
214        /// \note This operator only have to define some strict ordering of
215        /// the items; this order has nothing to do with the iteration
216        /// ordering of the items.
[1909]217        bool operator<(UEdge) const { return false; }
[1627]218      };
[1030]219
[1620]220      /// This iterator goes through each undirected edge.
[1030]221
[1620]222      /// This iterator goes through each undirected edge of a graph.
223      /// Its usage is quite simple, for example you can count the number
[1627]224      /// of undirected edges in a graph \c g of type \c Graph as follows:
[1946]225      ///\code
[1620]226      /// int count=0;
[1909]227      /// for(Graph::UEdgeIt e(g); e!=INVALID; ++e) ++count;
[1946]228      ///\endcode
[1909]229      class UEdgeIt : public UEdge {
[1620]230      public:
231        /// Default constructor
[1627]232
[1620]233        /// @warning The default constructor sets the iterator
234        /// to an undefined value.
[1909]235        UEdgeIt() { }
[1620]236        /// Copy constructor.
[1627]237
[1620]238        /// Copy constructor.
239        ///
[1909]240        UEdgeIt(const UEdgeIt& e) : UEdge(e) { }
[1620]241        /// Initialize the iterator to be invalid.
[1030]242
[1620]243        /// Initialize the iterator to be invalid.
244        ///
[1909]245        UEdgeIt(Invalid) { }
[1627]246        /// This constructor sets the iterator to the first undirected edge.
[1620]247   
[1627]248        /// This constructor sets the iterator to the first undirected edge.
[1909]249        UEdgeIt(const UGraph&) { }
250        /// UEdge -> UEdgeIt conversion
[1030]251
[1627]252        /// Sets the iterator to the value of the trivial iterator.
253        /// This feature necessitates that each time we
254        /// iterate the undirected edge-set, the iteration order is the
255        /// same.
[1909]256        UEdgeIt(const UGraph&, const UEdge&) { }
[1627]257        /// Next undirected edge
[1620]258       
[1627]259        /// Assign the iterator to the next undirected edge.
[1909]260        UEdgeIt& operator++() { return *this; }
[1620]261      };
[1030]262
[1627]263      /// \brief This iterator goes trough the incident undirected
264      /// edges of a node.
265      ///
[1620]266      /// This iterator goes trough the incident undirected edges
[2021]267      /// of a certain node of a graph. You should assume that the
268      /// loop edges will be iterated twice.
269      ///
[1620]270      /// Its usage is quite simple, for example you can compute the
[2021]271      /// degree (i.e. count the number of incident edges of a node \c n
272      /// in graph \c g of type \c Graph as follows.
273      ///
[1946]274      ///\code
[1620]275      /// int count=0;
276      /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
[1946]277      ///\endcode
[1909]278      class IncEdgeIt : public UEdge {
[1620]279      public:
280        /// Default constructor
[1030]281
[1620]282        /// @warning The default constructor sets the iterator
283        /// to an undefined value.
284        IncEdgeIt() { }
285        /// Copy constructor.
286
287        /// Copy constructor.
288        ///
[1909]289        IncEdgeIt(const IncEdgeIt& e) : UEdge(e) { }
[1620]290        /// Initialize the iterator to be invalid.
291
292        /// Initialize the iterator to be invalid.
293        ///
294        IncEdgeIt(Invalid) { }
295        /// This constructor sets the iterator to first incident edge.
296   
297        /// This constructor set the iterator to the first incident edge of
298        /// the node.
[1909]299        IncEdgeIt(const UGraph&, const Node&) { }
300        /// UEdge -> IncEdgeIt conversion
[1620]301
302        /// Sets the iterator to the value of the trivial iterator \c e.
303        /// This feature necessitates that each time we
304        /// iterate the edge-set, the iteration order is the same.
[1909]305        IncEdgeIt(const UGraph&, const UEdge&) { }
[1620]306        /// Next incident edge
307
308        /// Assign the iterator to the next incident edge
309        /// of the corresponding node.
310        IncEdgeIt& operator++() { return *this; }
311      };
312
[1627]313      /// The directed edge type.
314
315      /// The directed edge type. It can be converted to the
[2163]316      /// undirected edge or it should be inherited from the undirected
317      /// edge.
[1909]318      class Edge : public UEdge {
[1627]319      public:
320        /// Default constructor
321
322        /// @warning The default constructor sets the iterator
323        /// to an undefined value.
324        Edge() { }
325        /// Copy constructor.
326
327        /// Copy constructor.
328        ///
[1909]329        Edge(const Edge& e) : UEdge(e) { }
[1627]330        /// Initialize the iterator to be invalid.
331
332        /// Initialize the iterator to be invalid.
333        ///
334        Edge(Invalid) { }
335        /// Equality operator
336
337        /// Two iterators are equal if and only if they point to the
338        /// same object or both are invalid.
339        bool operator==(Edge) const { return true; }
340        /// Inequality operator
341
342        /// \sa operator==(Edge n)
343        ///
344        bool operator!=(Edge) const { return true; }
345
346        /// Artificial ordering operator.
347       
348        /// To allow the use of graph descriptors as key type in std::map or
349        /// similar associative container we require this.
350        ///
351        /// \note This operator only have to define some strict ordering of
352        /// the items; this order has nothing to do with the iteration
353        /// ordering of the items.
354        bool operator<(Edge) const { return false; }
355       
356      };
357      /// This iterator goes through each directed edge.
358
359      /// This iterator goes through each edge of a graph.
360      /// Its usage is quite simple, for example you can count the number
361      /// of edges in a graph \c g of type \c Graph as follows:
[1946]362      ///\code
[1627]363      /// int count=0;
364      /// for(Graph::EdgeIt e(g); e!=INVALID; ++e) ++count;
[1946]365      ///\endcode
[1627]366      class EdgeIt : public Edge {
367      public:
368        /// Default constructor
369
370        /// @warning The default constructor sets the iterator
371        /// to an undefined value.
372        EdgeIt() { }
373        /// Copy constructor.
374
375        /// Copy constructor.
376        ///
377        EdgeIt(const EdgeIt& e) : Edge(e) { }
378        /// Initialize the iterator to be invalid.
379
380        /// Initialize the iterator to be invalid.
381        ///
382        EdgeIt(Invalid) { }
383        /// This constructor sets the iterator to the first edge.
384   
385        /// This constructor sets the iterator to the first edge of \c g.
386        ///@param g the graph
[1909]387        EdgeIt(const UGraph &g) { ignore_unused_variable_warning(g); }
[1627]388        /// Edge -> EdgeIt conversion
389
390        /// Sets the iterator to the value of the trivial iterator \c e.
391        /// This feature necessitates that each time we
392        /// iterate the edge-set, the iteration order is the same.
[1909]393        EdgeIt(const UGraph&, const Edge&) { }
[1627]394        ///Next edge
395       
396        /// Assign the iterator to the next edge.
397        EdgeIt& operator++() { return *this; }
398      };
399   
400      /// This iterator goes trough the outgoing directed edges of a node.
401
402      /// This iterator goes trough the \e outgoing edges of a certain node
403      /// of a graph.
404      /// Its usage is quite simple, for example you can count the number
405      /// of outgoing edges of a node \c n
406      /// in graph \c g of type \c Graph as follows.
[1946]407      ///\code
[1627]408      /// int count=0;
409      /// for (Graph::OutEdgeIt e(g, n); e!=INVALID; ++e) ++count;
[1946]410      ///\endcode
[1627]411   
412      class OutEdgeIt : public Edge {
413      public:
414        /// Default constructor
415
416        /// @warning The default constructor sets the iterator
417        /// to an undefined value.
418        OutEdgeIt() { }
419        /// Copy constructor.
420
421        /// Copy constructor.
422        ///
423        OutEdgeIt(const OutEdgeIt& e) : Edge(e) { }
424        /// Initialize the iterator to be invalid.
425
426        /// Initialize the iterator to be invalid.
427        ///
428        OutEdgeIt(Invalid) { }
429        /// This constructor sets the iterator to the first outgoing edge.
430   
431        /// This constructor sets the iterator to the first outgoing edge of
432        /// the node.
433        ///@param n the node
434        ///@param g the graph
[1909]435        OutEdgeIt(const UGraph& n, const Node& g) {
[1643]436          ignore_unused_variable_warning(n);
437          ignore_unused_variable_warning(g);
438        }
[1627]439        /// Edge -> OutEdgeIt conversion
440
441        /// Sets the iterator to the value of the trivial iterator.
442        /// This feature necessitates that each time we
443        /// iterate the edge-set, the iteration order is the same.
[1909]444        OutEdgeIt(const UGraph&, const Edge&) { }
[1627]445        ///Next outgoing edge
446       
447        /// Assign the iterator to the next
448        /// outgoing edge of the corresponding node.
449        OutEdgeIt& operator++() { return *this; }
450      };
451
452      /// This iterator goes trough the incoming directed edges of a node.
453
454      /// This iterator goes trough the \e incoming edges of a certain node
455      /// of a graph.
456      /// Its usage is quite simple, for example you can count the number
457      /// of outgoing edges of a node \c n
458      /// in graph \c g of type \c Graph as follows.
[1946]459      ///\code
[1627]460      /// int count=0;
461      /// for(Graph::InEdgeIt e(g, n); e!=INVALID; ++e) ++count;
[1946]462      ///\endcode
[1627]463
464      class InEdgeIt : public Edge {
465      public:
466        /// Default constructor
467
468        /// @warning The default constructor sets the iterator
469        /// to an undefined value.
470        InEdgeIt() { }
471        /// Copy constructor.
472
473        /// Copy constructor.
474        ///
475        InEdgeIt(const InEdgeIt& e) : Edge(e) { }
476        /// Initialize the iterator to be invalid.
477
478        /// Initialize the iterator to be invalid.
479        ///
480        InEdgeIt(Invalid) { }
481        /// This constructor sets the iterator to first incoming edge.
482   
483        /// This constructor set the iterator to the first incoming edge of
484        /// the node.
485        ///@param n the node
486        ///@param g the graph
[1909]487        InEdgeIt(const UGraph& g, const Node& n) {
[1643]488          ignore_unused_variable_warning(n);
489          ignore_unused_variable_warning(g);
490        }
[1627]491        /// Edge -> InEdgeIt conversion
492
493        /// Sets the iterator to the value of the trivial iterator \c e.
494        /// This feature necessitates that each time we
495        /// iterate the edge-set, the iteration order is the same.
[1909]496        InEdgeIt(const UGraph&, const Edge&) { }
[1627]497        /// Next incoming edge
498
499        /// Assign the iterator to the next inedge of the corresponding node.
500        ///
501        InEdgeIt& operator++() { return *this; }
502      };
503
504      /// \brief Read write map of the nodes to type \c T.
505      ///
506      /// ReadWrite map of the nodes to type \c T.
507      /// \sa Reference
508      /// \warning Making maps that can handle bool type (NodeMap<bool>)
509      /// needs some extra attention!
510      template<class T>
511      class NodeMap : public ReadWriteMap< Node, T >
512      {
513      public:
514
515        ///\e
[1909]516        NodeMap(const UGraph&) { }
[1627]517        ///\e
[1909]518        NodeMap(const UGraph&, T) { }
[1627]519
520        ///Copy constructor
521        NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
522        ///Assignment operator
[2121]523        template <typename CMap>
524        NodeMap& operator=(const CMap&) {
525          checkConcept<ReadMap<Node, T>, CMap>();
526          return *this;
527        }
[1627]528      };
529
530      /// \brief Read write map of the directed edges to type \c T.
531      ///
532      /// Reference map of the directed edges to type \c T.
533      /// \sa Reference
534      /// \warning Making maps that can handle bool type (EdgeMap<bool>)
535      /// needs some extra attention!
536      template<class T>
537      class EdgeMap : public ReadWriteMap<Edge,T>
538      {
539      public:
540
541        ///\e
[1909]542        EdgeMap(const UGraph&) { }
[1627]543        ///\e
[1909]544        EdgeMap(const UGraph&, T) { }
[1627]545        ///Copy constructor
546        EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) { }
547        ///Assignment operator
[2121]548        template <typename CMap>
549        EdgeMap& operator=(const CMap&) {
550          checkConcept<ReadMap<Edge, T>, CMap>();
551          return *this;
552        }
[1627]553      };
554
[1620]555      /// Read write map of the undirected edges to type \c T.
556
557      /// Reference map of the edges to type \c T.
558      /// \sa Reference
[1909]559      /// \warning Making maps that can handle bool type (UEdgeMap<bool>)
[1620]560      /// needs some extra attention!
561      template<class T>
[1909]562      class UEdgeMap : public ReadWriteMap<UEdge,T>
[1620]563      {
[1030]564      public:
565
[1620]566        ///\e
[1909]567        UEdgeMap(const UGraph&) { }
[1620]568        ///\e
[1909]569        UEdgeMap(const UGraph&, T) { }
[1620]570        ///Copy constructor
[1909]571        UEdgeMap(const UEdgeMap& em) : ReadWriteMap<UEdge,T>(em) {}
[1620]572        ///Assignment operator
[2121]573        template <typename CMap>
574        UEdgeMap& operator=(const CMap&) {
575          checkConcept<ReadMap<UEdge, T>, CMap>();
576          return *this;
577        }
[1030]578      };
579
[1627]580      /// \brief Direct the given undirected edge.
581      ///
582      /// Direct the given undirected edge. The returned edge source
[2163]583      /// will be the given node.
[1909]584      Edge direct(const UEdge&, const Node&) const {
[1627]585        return INVALID;
586      }
[1030]587
[1627]588      /// \brief Direct the given undirected edge.
589      ///
[2163]590      /// Direct the given undirected edge. The returned edge
591      /// represents the given undireted edge and the direction comes
592      /// from the given bool.  The source of the undirected edge and
593      /// the directed edge is the same when the given bool is true.
[1909]594      Edge direct(const UEdge&, bool) const {
[1627]595        return INVALID;
596      }
597
598      /// \brief Returns true if the edge has default orientation.
599      ///
[1030]600      /// Returns whether the given directed edge is same orientation as
[2163]601      /// the corresponding undirected edge's default orientation.
[1627]602      bool direction(Edge) const { return true; }
603
604      /// \brief Returns the opposite directed edge.
[1030]605      ///
[1627]606      /// Returns the opposite directed edge.
607      Edge oppositeEdge(Edge) const { return INVALID; }
[1030]608
[1627]609      /// \brief Opposite node on an edge
610      ///
[2163]611      /// \return the opposite of the given Node on the given UEdge
[1909]612      Node oppositeNode(Node, UEdge) const { return INVALID; }
[1030]613
[1627]614      /// \brief First node of the undirected edge.
615      ///
[1909]616      /// \return the first node of the given UEdge.
[1030]617      ///
[2163]618      /// Naturally undirected edges don't have direction and thus
[1030]619      /// don't have source and target node. But we use these two methods
[2163]620      /// to query the two nodes of the edge. The direction of the edge
[1030]621      /// which arises this way is called the inherent direction of the
[1627]622      /// undirected edge, and is used to define the "default" direction
[1030]623      /// of the directed versions of the edges.
[1627]624      /// \sa direction
[1909]625      Node source(UEdge) const { return INVALID; }
[1030]626
[1627]627      /// \brief Second node of the undirected edge.
[1909]628      Node target(UEdge) const { return INVALID; }
[1030]629
[1627]630      /// \brief Source node of the directed edge.
[1030]631      Node source(Edge) const { return INVALID; }
632
[1627]633      /// \brief Target node of the directed edge.
[1030]634      Node target(Edge) const { return INVALID; }
635
636      void first(Node&) const {}
637      void next(Node&) const {}
638
[1909]639      void first(UEdge&) const {}
640      void next(UEdge&) const {}
[1030]641
642      void first(Edge&) const {}
643      void next(Edge&) const {}
644
645      void firstOut(Edge&, Node) const {}
646      void nextOut(Edge&) const {}
647
648      void firstIn(Edge&, Node) const {}
649      void nextIn(Edge&) const {}
650
651
[1980]652      void firstInc(UEdge &, bool &, const Node &) const {}
653      void nextInc(UEdge &, bool &) const {}
654
[1627]655      /// \brief Base node of the iterator
[1158]656      ///
657      /// Returns the base node (the source in this case) of the iterator
658      Node baseNode(OutEdgeIt e) const {
659        return source(e);
660      }
[1627]661      /// \brief Running node of the iterator
[1158]662      ///
663      /// Returns the running node (the target in this case) of the
664      /// iterator
665      Node runningNode(OutEdgeIt e) const {
666        return target(e);
667      }
668
[1627]669      /// \brief Base node of the iterator
[1158]670      ///
671      /// Returns the base node (the target in this case) of the iterator
672      Node baseNode(InEdgeIt e) const {
673        return target(e);
674      }
[1627]675      /// \brief Running node of the iterator
[1158]676      ///
677      /// Returns the running node (the source in this case) of the
678      /// iterator
679      Node runningNode(InEdgeIt e) const {
680        return source(e);
681      }
682
[1627]683      /// \brief Base node of the iterator
[1158]684      ///
685      /// Returns the base node of the iterator
[1367]686      Node baseNode(IncEdgeIt) const {
[1158]687        return INVALID;
688      }
[1627]689     
690      /// \brief Running node of the iterator
[1158]691      ///
692      /// Returns the running node of the iterator
[1367]693      Node runningNode(IncEdgeIt) const {
[1158]694        return INVALID;
695      }
696
[1022]697      template <typename Graph>
698      struct Constraints {
699        void constraints() {
[2121]700          checkConcept<BaseIterableUGraphComponent<>, Graph>();
701          checkConcept<IterableUGraphComponent<>, Graph>();
702          checkConcept<MappableUGraphComponent<>, Graph>();
[1022]703        }
704      };
705
706    };
707
[1030]708    /// @}
709
[962]710  }
711
712}
713
714#endif
Note: See TracBrowser for help on using the repository browser.