1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
3 * This file is a part of LEMON, a generic C++ optimization library.
5 * Copyright (C) 2003-2013
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
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.
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
19 ///\ingroup graph_concepts
21 ///\brief The concept of undirected graphs.
23 #ifndef LEMON_CONCEPTS_GRAPH_H
24 #define LEMON_CONCEPTS_GRAPH_H
26 #include <lemon/concepts/graph_components.h>
27 #include <lemon/concepts/maps.h>
28 #include <lemon/concept_check.h>
29 #include <lemon/core.h>
30 #include <lemon/bits/stl_iterators.h>
35 /// \ingroup graph_concepts
37 /// \brief Class describing the concept of undirected graphs.
39 /// This class describes the common interface of all undirected
42 /// Like all concept classes, it only provides an interface
43 /// without any sensible implementation. So any general algorithm for
44 /// undirected graphs should compile with this class, but it will not
45 /// run properly, of course.
46 /// An actual graph implementation like \ref ListGraph or
47 /// \ref SmartGraph may have additional functionality.
49 /// The undirected graphs also fulfill the concept of \ref Digraph
50 /// "directed graphs", since each edge can also be regarded as two
51 /// oppositely directed arcs.
52 /// Undirected graphs provide an Edge type for the undirected edges and
53 /// an Arc type for the directed arcs. The Arc type is convertible to
54 /// Edge or inherited from it, i.e. the corresponding edge can be
55 /// obtained from an arc.
56 /// EdgeIt and EdgeMap classes can be used for the edges, while ArcIt
57 /// and ArcMap classes can be used for the arcs (just like in digraphs).
58 /// Both InArcIt and OutArcIt iterates on the same edges but with
59 /// opposite direction. IncEdgeIt also iterates on the same edges
60 /// as OutArcIt and InArcIt, but it is not convertible to Arc,
63 /// In LEMON, each undirected edge has an inherent orientation.
64 /// Thus it can defined if an arc is forward or backward oriented in
65 /// an undirected graph with respect to this default oriantation of
66 /// the represented edge.
67 /// With the direction() and direct() functions the direction
68 /// of an arc can be obtained and set, respectively.
70 /// Only nodes and edges can be added to or removed from an undirected
71 /// graph and the corresponding arcs are added or removed automatically.
76 /// Graphs are \e not copy constructible. Use GraphCopy instead.
77 Graph(const Graph&) {}
78 /// \brief Assignment of a graph to another one is \e not allowed.
79 /// Use GraphCopy instead.
80 void operator=(const Graph&) {}
83 /// Default constructor.
86 /// \brief Undirected graphs should be tagged with \c UndirectedTag.
88 /// Undirected graphs should be tagged with \c UndirectedTag.
90 /// This tag helps the \c enable_if technics to make compile time
91 /// specializations for undirected graphs.
92 typedef True UndirectedTag;
94 /// The node type of the graph
96 /// This class identifies a node of the graph. It also serves
97 /// as a base class of the node iterators,
98 /// thus they convert to this type.
101 /// Default constructor
103 /// Default constructor.
104 /// \warning It sets the object to an undefined value.
106 /// Copy constructor.
108 /// Copy constructor.
110 Node(const Node&) { }
112 /// %Invalid constructor \& conversion.
114 /// Initializes the object to be invalid.
115 /// \sa Invalid for more details.
117 /// Equality operator
119 /// Equality operator.
121 /// Two iterators are equal if and only if they point to the
122 /// same object or both are \c INVALID.
123 bool operator==(Node) const { return true; }
125 /// Inequality operator
127 /// Inequality operator.
128 bool operator!=(Node) const { return true; }
130 /// Artificial ordering operator.
132 /// Artificial ordering operator.
134 /// \note This operator only has to define some strict ordering of
135 /// the items; this order has nothing to do with the iteration
136 /// ordering of the items.
137 bool operator<(Node) const { return false; }
141 /// Iterator class for the nodes.
143 /// This iterator goes through each node of the graph.
144 /// Its usage is quite simple, for example, you can count the number
145 /// of nodes in a graph \c g of type \c %Graph like this:
148 /// for (Graph::NodeIt n(g); n!=INVALID; ++n) ++count;
150 class NodeIt : public Node {
152 /// Default constructor
154 /// Default constructor.
155 /// \warning It sets the iterator to an undefined value.
157 /// Copy constructor.
159 /// Copy constructor.
161 NodeIt(const NodeIt& n) : Node(n) { }
162 /// %Invalid constructor \& conversion.
164 /// Initializes the iterator to be invalid.
165 /// \sa Invalid for more details.
167 /// Sets the iterator to the first node.
169 /// Sets the iterator to the first node of the given digraph.
171 explicit NodeIt(const Graph&) { }
172 /// Sets the iterator to the given node.
174 /// Sets the iterator to the given node of the given digraph.
176 NodeIt(const Graph&, const Node&) { }
179 /// Assign the iterator to the next node.
181 NodeIt& operator++() { return *this; }
184 /// \brief Gets the collection of the nodes of the graph.
186 /// This function can be used for iterating on
187 /// the nodes of the graph. It returns a wrapped NodeIt, which looks
188 /// like an STL container (by having begin() and end())
189 /// which you can use in range-based for loops, STL algorithms, etc.
190 /// For example you can write:
193 /// for(auto v: g.nodes())
196 /// //Using an STL algorithm:
197 /// copy(g.nodes().begin(), g.nodes().end(), vect.begin());
199 LemonRangeWrapper1<NodeIt, Graph> nodes() const {
200 return LemonRangeWrapper1<NodeIt, Graph>(*this);
204 /// The edge type of the graph
206 /// This class identifies an edge of the graph. It also serves
207 /// as a base class of the edge iterators,
208 /// thus they will convert to this type.
211 /// Default constructor
213 /// Default constructor.
214 /// \warning It sets the object to an undefined value.
216 /// Copy constructor.
218 /// Copy constructor.
220 Edge(const Edge&) { }
221 /// %Invalid constructor \& conversion.
223 /// Initializes the object to be invalid.
224 /// \sa Invalid for more details.
226 /// Equality operator
228 /// Equality operator.
230 /// Two iterators are equal if and only if they point to the
231 /// same object or both are \c INVALID.
232 bool operator==(Edge) const { return true; }
233 /// Inequality operator
235 /// Inequality operator.
236 bool operator!=(Edge) const { return true; }
238 /// Artificial ordering operator.
240 /// Artificial ordering operator.
242 /// \note This operator only has to define some strict ordering of
243 /// the edges; this order has nothing to do with the iteration
244 /// ordering of the edges.
245 bool operator<(Edge) const { return false; }
248 /// Iterator class for the edges.
250 /// This iterator goes through each edge of the graph.
251 /// Its usage is quite simple, for example, you can count the number
252 /// of edges in a graph \c g of type \c %Graph as follows:
255 /// for(Graph::EdgeIt e(g); e!=INVALID; ++e) ++count;
257 class EdgeIt : public Edge {
259 /// Default constructor
261 /// Default constructor.
262 /// \warning It sets the iterator to an undefined value.
264 /// Copy constructor.
266 /// Copy constructor.
268 EdgeIt(const EdgeIt& e) : Edge(e) { }
269 /// %Invalid constructor \& conversion.
271 /// Initializes the iterator to be invalid.
272 /// \sa Invalid for more details.
274 /// Sets the iterator to the first edge.
276 /// Sets the iterator to the first edge of the given graph.
278 explicit EdgeIt(const Graph&) { }
279 /// Sets the iterator to the given edge.
281 /// Sets the iterator to the given edge of the given graph.
283 EdgeIt(const Graph&, const Edge&) { }
286 /// Assign the iterator to the next edge.
288 EdgeIt& operator++() { return *this; }
291 /// \brief Gets the collection of the edges of the graph.
293 /// This function can be used for iterating on the
294 /// edges of the graph. It returns a wrapped
295 /// EdgeIt, which looks like an STL container
296 /// (by having begin() and end()) which you can use in range-based
297 /// for loops, STL algorithms, etc.
298 /// For example you can write:
301 /// for(auto e: g.edges())
304 /// //Using an STL algorithm:
305 /// copy(g.edges().begin(), g.edges().end(), vect.begin());
307 LemonRangeWrapper1<EdgeIt, Graph> edges() const {
308 return LemonRangeWrapper1<EdgeIt, Graph>(*this);
312 /// Iterator class for the incident edges of a node.
314 /// This iterator goes trough the incident undirected edges
315 /// of a certain node of a graph.
316 /// Its usage is quite simple, for example, you can compute the
317 /// degree (i.e. the number of incident edges) of a node \c n
318 /// in a graph \c g of type \c %Graph as follows.
322 /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
325 /// \warning Loop edges will be iterated twice.
326 class IncEdgeIt : public Edge {
328 /// Default constructor
330 /// Default constructor.
331 /// \warning It sets the iterator to an undefined value.
333 /// Copy constructor.
335 /// Copy constructor.
337 IncEdgeIt(const IncEdgeIt& e) : Edge(e) { }
338 /// %Invalid constructor \& conversion.
340 /// Initializes the iterator to be invalid.
341 /// \sa Invalid for more details.
342 IncEdgeIt(Invalid) { }
343 /// Sets the iterator to the first incident edge.
345 /// Sets the iterator to the first incident edge of the given node.
347 IncEdgeIt(const Graph&, const Node&) { }
348 /// Sets the iterator to the given edge.
350 /// Sets the iterator to the given edge of the given graph.
352 IncEdgeIt(const Graph&, const Edge&) { }
353 /// Next incident edge
355 /// Assign the iterator to the next incident edge
356 /// of the corresponding node.
357 IncEdgeIt& operator++() { return *this; }
360 /// \brief Gets the collection of the incident undirected edges
361 /// of a certain node of the graph.
363 /// This function can be used for iterating on the
364 /// incident undirected edges of a certain node of the graph.
365 /// It returns a wrapped
366 /// IncEdgeIt, which looks like an STL container
367 /// (by having begin() and end()) which you can use in range-based
368 /// for loops, STL algorithms, etc.
369 /// For example if g is a Graph and u is a Node, you can write:
371 /// for(auto e: g.incEdges(u))
374 /// //Using an STL algorithm:
375 /// copy(g.incEdges(u).begin(), g.incEdges(u).end(), vect.begin());
377 LemonRangeWrapper2<IncEdgeIt, Graph, Node> incEdges(const Node& u) const {
378 return LemonRangeWrapper2<IncEdgeIt, Graph, Node>(*this, u);
382 /// The arc type of the graph
384 /// This class identifies a directed arc of the graph. It also serves
385 /// as a base class of the arc iterators,
386 /// thus they will convert to this type.
389 /// Default constructor
391 /// Default constructor.
392 /// \warning It sets the object to an undefined value.
394 /// Copy constructor.
396 /// Copy constructor.
399 /// %Invalid constructor \& conversion.
401 /// Initializes the object to be invalid.
402 /// \sa Invalid for more details.
404 /// Equality operator
406 /// Equality operator.
408 /// Two iterators are equal if and only if they point to the
409 /// same object or both are \c INVALID.
410 bool operator==(Arc) const { return true; }
411 /// Inequality operator
413 /// Inequality operator.
414 bool operator!=(Arc) const { return true; }
416 /// Artificial ordering operator.
418 /// Artificial ordering operator.
420 /// \note This operator only has to define some strict ordering of
421 /// the arcs; this order has nothing to do with the iteration
422 /// ordering of the arcs.
423 bool operator<(Arc) const { return false; }
425 /// Converison to \c Edge
427 /// Converison to \c Edge.
429 operator Edge() const { return Edge(); }
432 /// Iterator class for the arcs.
434 /// This iterator goes through each directed arc of the graph.
435 /// Its usage is quite simple, for example, you can count the number
436 /// of arcs in a graph \c g of type \c %Graph as follows:
439 /// for(Graph::ArcIt a(g); a!=INVALID; ++a) ++count;
441 class ArcIt : public Arc {
443 /// Default constructor
445 /// Default constructor.
446 /// \warning It sets the iterator to an undefined value.
448 /// Copy constructor.
450 /// Copy constructor.
452 ArcIt(const ArcIt& e) : Arc(e) { }
453 /// %Invalid constructor \& conversion.
455 /// Initializes the iterator to be invalid.
456 /// \sa Invalid for more details.
458 /// Sets the iterator to the first arc.
460 /// Sets the iterator to the first arc of the given graph.
462 explicit ArcIt(const Graph &g) {
463 ::lemon::ignore_unused_variable_warning(g);
465 /// Sets the iterator to the given arc.
467 /// Sets the iterator to the given arc of the given graph.
469 ArcIt(const Graph&, const Arc&) { }
472 /// Assign the iterator to the next arc.
474 ArcIt& operator++() { return *this; }
477 /// \brief Gets the collection of the directed arcs of the graph.
479 /// This function can be used for iterating on the
480 /// arcs of the graph. It returns a wrapped
481 /// ArcIt, which looks like an STL container
482 /// (by having begin() and end()) which you can use in range-based
483 /// for loops, STL algorithms, etc.
484 /// For example you can write:
487 /// for(auto a: g.arcs())
490 /// //Using an STL algorithm:
491 /// copy(g.arcs().begin(), g.arcs().end(), vect.begin());
493 LemonRangeWrapper1<ArcIt, Graph> arcs() const {
494 return LemonRangeWrapper1<ArcIt, Graph>(*this);
498 /// Iterator class for the outgoing arcs of a node.
500 /// This iterator goes trough the \e outgoing directed arcs of a
501 /// certain node of a graph.
502 /// Its usage is quite simple, for example, you can count the number
503 /// of outgoing arcs of a node \c n
504 /// in a graph \c g of type \c %Graph as follows.
507 /// for (Digraph::OutArcIt a(g, n); a!=INVALID; ++a) ++count;
509 class OutArcIt : public Arc {
511 /// Default constructor
513 /// Default constructor.
514 /// \warning It sets the iterator to an undefined value.
516 /// Copy constructor.
518 /// Copy constructor.
520 OutArcIt(const OutArcIt& e) : Arc(e) { }
521 /// %Invalid constructor \& conversion.
523 /// Initializes the iterator to be invalid.
524 /// \sa Invalid for more details.
525 OutArcIt(Invalid) { }
526 /// Sets the iterator to the first outgoing arc.
528 /// Sets the iterator to the first outgoing arc of the given node.
530 OutArcIt(const Graph& n, const Node& g) {
531 ::lemon::ignore_unused_variable_warning(n);
532 ::lemon::ignore_unused_variable_warning(g);
534 /// Sets the iterator to the given arc.
536 /// Sets the iterator to the given arc of the given graph.
538 OutArcIt(const Graph&, const Arc&) { }
539 /// Next outgoing arc
541 /// Assign the iterator to the next
542 /// outgoing arc of the corresponding node.
543 OutArcIt& operator++() { return *this; }
546 /// \brief Gets the collection of the outgoing directed arcs of a
547 /// certain node of the graph.
549 /// This function can be used for iterating on the
550 /// outgoing arcs of a certain node of the graph. It returns a wrapped
551 /// OutArcIt, which looks like an STL container
552 /// (by having begin() and end()) which you can use in range-based
553 /// for loops, STL algorithms, etc.
554 /// For example if g is a Graph and u is a Node, you can write:
556 /// for(auto a: g.outArcs(u))
559 /// //Using an STL algorithm:
560 /// copy(g.outArcs(u).begin(), g.outArcs(u).end(), vect.begin());
562 LemonRangeWrapper2<OutArcIt, Graph, Node> outArcs(const Node& u) const {
563 return LemonRangeWrapper2<OutArcIt, Graph, Node>(*this, u);
567 /// Iterator class for the incoming arcs of a node.
569 /// This iterator goes trough the \e incoming directed arcs of a
570 /// certain node of a graph.
571 /// Its usage is quite simple, for example, you can count the number
572 /// of incoming arcs of a node \c n
573 /// in a graph \c g of type \c %Graph as follows.
576 /// for (Digraph::InArcIt a(g, n); a!=INVALID; ++a) ++count;
578 class InArcIt : public Arc {
580 /// Default constructor
582 /// Default constructor.
583 /// \warning It sets the iterator to an undefined value.
585 /// Copy constructor.
587 /// Copy constructor.
589 InArcIt(const InArcIt& e) : Arc(e) { }
590 /// %Invalid constructor \& conversion.
592 /// Initializes the iterator to be invalid.
593 /// \sa Invalid for more details.
595 /// Sets the iterator to the first incoming arc.
597 /// Sets the iterator to the first incoming arc of the given node.
599 InArcIt(const Graph& g, const Node& n) {
600 ::lemon::ignore_unused_variable_warning(n);
601 ::lemon::ignore_unused_variable_warning(g);
603 /// Sets the iterator to the given arc.
605 /// Sets the iterator to the given arc of the given graph.
607 InArcIt(const Graph&, const Arc&) { }
608 /// Next incoming arc
610 /// Assign the iterator to the next
611 /// incoming arc of the corresponding node.
612 InArcIt& operator++() { return *this; }
615 /// \brief Gets the collection of the incoming directed arcs of
616 /// a certain node of the graph.
618 /// This function can be used for iterating on the
619 /// incoming directed arcs of a certain node of the graph. It returns
620 /// a wrapped InArcIt, which looks like an STL container
621 /// (by having begin() and end()) which you can use in range-based
622 /// for loops, STL algorithms, etc.
623 /// For example if g is a Graph and u is a Node, you can write:
625 /// for(auto a: g.inArcs(u))
628 /// //Using an STL algorithm:
629 /// copy(g.inArcs(u).begin(), g.inArcs(u).end(), vect.begin());
631 LemonRangeWrapper2<InArcIt, Graph, Node> inArcs(const Node& u) const {
632 return LemonRangeWrapper2<InArcIt, Graph, Node>(*this, u);
635 /// \brief Standard graph map type for the nodes.
637 /// Standard graph map type for the nodes.
638 /// It conforms to the ReferenceMap concept.
640 class NodeMap : public ReferenceMap<Node, T, T&, const T&>
645 explicit NodeMap(const Graph&) { }
646 /// Constructor with given initial value
647 NodeMap(const Graph&, T) { }
651 NodeMap(const NodeMap& nm) :
652 ReferenceMap<Node, T, T&, const T&>(nm) { }
653 ///Assignment operator
654 template <typename CMap>
655 NodeMap& operator=(const CMap&) {
656 checkConcept<ReadMap<Node, T>, CMap>();
661 /// \brief Standard graph map type for the arcs.
663 /// Standard graph map type for the arcs.
664 /// It conforms to the ReferenceMap concept.
666 class ArcMap : public ReferenceMap<Arc, T, T&, const T&>
671 explicit ArcMap(const Graph&) { }
672 /// Constructor with given initial value
673 ArcMap(const Graph&, T) { }
677 ArcMap(const ArcMap& em) :
678 ReferenceMap<Arc, T, T&, const T&>(em) { }
679 ///Assignment operator
680 template <typename CMap>
681 ArcMap& operator=(const CMap&) {
682 checkConcept<ReadMap<Arc, T>, CMap>();
687 /// \brief Standard graph map type for the edges.
689 /// Standard graph map type for the edges.
690 /// It conforms to the ReferenceMap concept.
692 class EdgeMap : public ReferenceMap<Edge, T, T&, const T&>
697 explicit EdgeMap(const Graph&) { }
698 /// Constructor with given initial value
699 EdgeMap(const Graph&, T) { }
703 EdgeMap(const EdgeMap& em) :
704 ReferenceMap<Edge, T, T&, const T&>(em) {}
705 ///Assignment operator
706 template <typename CMap>
707 EdgeMap& operator=(const CMap&) {
708 checkConcept<ReadMap<Edge, T>, CMap>();
713 /// \brief The first node of the edge.
715 /// Returns the first node of the given edge.
717 /// Edges don't have source and target nodes, however, methods
718 /// u() and v() are used to query the two end-nodes of an edge.
719 /// The orientation of an edge that arises this way is called
720 /// the inherent direction, it is used to define the default
721 /// direction for the corresponding arcs.
724 Node u(Edge) const { return INVALID; }
726 /// \brief The second node of the edge.
728 /// Returns the second node of the given edge.
730 /// Edges don't have source and target nodes, however, methods
731 /// u() and v() are used to query the two end-nodes of an edge.
732 /// The orientation of an edge that arises this way is called
733 /// the inherent direction, it is used to define the default
734 /// direction for the corresponding arcs.
737 Node v(Edge) const { return INVALID; }
739 /// \brief The source node of the arc.
741 /// Returns the source node of the given arc.
742 Node source(Arc) const { return INVALID; }
744 /// \brief The target node of the arc.
746 /// Returns the target node of the given arc.
747 Node target(Arc) const { return INVALID; }
749 /// \brief The ID of the node.
751 /// Returns the ID of the given node.
752 int id(Node) const { return -1; }
754 /// \brief The ID of the edge.
756 /// Returns the ID of the given edge.
757 int id(Edge) const { return -1; }
759 /// \brief The ID of the arc.
761 /// Returns the ID of the given arc.
762 int id(Arc) const { return -1; }
764 /// \brief The node with the given ID.
766 /// Returns the node with the given ID.
767 /// \pre The argument should be a valid node ID in the graph.
768 Node nodeFromId(int) const { return INVALID; }
770 /// \brief The edge with the given ID.
772 /// Returns the edge with the given ID.
773 /// \pre The argument should be a valid edge ID in the graph.
774 Edge edgeFromId(int) const { return INVALID; }
776 /// \brief The arc with the given ID.
778 /// Returns the arc with the given ID.
779 /// \pre The argument should be a valid arc ID in the graph.
780 Arc arcFromId(int) const { return INVALID; }
782 /// \brief An upper bound on the node IDs.
784 /// Returns an upper bound on the node IDs.
785 int maxNodeId() const { return -1; }
787 /// \brief An upper bound on the edge IDs.
789 /// Returns an upper bound on the edge IDs.
790 int maxEdgeId() const { return -1; }
792 /// \brief An upper bound on the arc IDs.
794 /// Returns an upper bound on the arc IDs.
795 int maxArcId() const { return -1; }
797 /// \brief The direction of the arc.
799 /// Returns \c true if the direction of the given arc is the same as
800 /// the inherent orientation of the represented edge.
801 bool direction(Arc) const { return true; }
803 /// \brief Direct the edge.
805 /// Direct the given edge. The returned arc
806 /// represents the given edge and its direction comes
807 /// from the bool parameter. If it is \c true, then the direction
808 /// of the arc is the same as the inherent orientation of the edge.
809 Arc direct(Edge, bool) const {
813 /// \brief Direct the edge.
815 /// Direct the given edge. The returned arc represents the given
816 /// edge and its source node is the given node.
817 Arc direct(Edge, Node) const {
821 /// \brief The oppositely directed arc.
823 /// Returns the oppositely directed arc representing the same edge.
824 Arc oppositeArc(Arc) const { return INVALID; }
826 /// \brief The opposite node on the edge.
828 /// Returns the opposite node on the given edge.
829 Node oppositeNode(Node, Edge) const { return INVALID; }
831 void first(Node&) const {}
832 void next(Node&) const {}
834 void first(Edge&) const {}
835 void next(Edge&) const {}
837 void first(Arc&) const {}
838 void next(Arc&) const {}
840 void firstOut(Arc&, Node) const {}
841 void nextOut(Arc&) const {}
843 void firstIn(Arc&, Node) const {}
844 void nextIn(Arc&) const {}
846 void firstInc(Edge &, bool &, const Node &) const {}
847 void nextInc(Edge &, bool &) const {}
849 // The second parameter is dummy.
850 Node fromId(int, Node) const { return INVALID; }
851 // The second parameter is dummy.
852 Edge fromId(int, Edge) const { return INVALID; }
853 // The second parameter is dummy.
854 Arc fromId(int, Arc) const { return INVALID; }
857 int maxId(Node) const { return -1; }
859 int maxId(Edge) const { return -1; }
861 int maxId(Arc) const { return -1; }
863 /// \brief The base node of the iterator.
865 /// Returns the base node of the given incident edge iterator.
866 Node baseNode(IncEdgeIt) const { return INVALID; }
868 /// \brief The running node of the iterator.
870 /// Returns the running node of the given incident edge iterator.
871 Node runningNode(IncEdgeIt) const { return INVALID; }
873 /// \brief The base node of the iterator.
875 /// Returns the base node of the given outgoing arc iterator
876 /// (i.e. the source node of the corresponding arc).
877 Node baseNode(OutArcIt) const { return INVALID; }
879 /// \brief The running node of the iterator.
881 /// Returns the running node of the given outgoing arc iterator
882 /// (i.e. the target node of the corresponding arc).
883 Node runningNode(OutArcIt) const { return INVALID; }
885 /// \brief The base node of the iterator.
887 /// Returns the base node of the given incoming arc iterator
888 /// (i.e. the target node of the corresponding arc).
889 Node baseNode(InArcIt) const { return INVALID; }
891 /// \brief The running node of the iterator.
893 /// Returns the running node of the given incoming arc iterator
894 /// (i.e. the source node of the corresponding arc).
895 Node runningNode(InArcIt) const { return INVALID; }
897 template <typename _Graph>
900 checkConcept<BaseGraphComponent, _Graph>();
901 checkConcept<IterableGraphComponent<>, _Graph>();
902 checkConcept<IDableGraphComponent<>, _Graph>();
903 checkConcept<MappableGraphComponent<>, _Graph>();