Major improvements in NetworkSimplex.
Main changes:
- Use -potenital[] instead of potential[] to conform to the usual
terminology.
- Use function parameter instead of #define commands to select pivot rule.
- Use much faster implementation for the candidate list pivot rule.
It is about 5-20 times faster now.
- Add a new pivot rule called "Limited Search" that is a modified
version of "Block Search". It is about 25 percent faster on rather
sparse graphs.
- By default "Limited Search" is used for sparse graphs and
"Block Search" is used otherwise. This combined method is the most
efficient on every input class.
- Change the name of private members to start with "_".
- Change the name of function parameters not to start with "_".
- Remove unnecessary documentation for private members.
- Many doc improvements.
3 * This file is a part of LEMON, a generic C++ optimization library
5 * Copyright (C) 2003-2008
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 Bipartite Undirected Graphs.
23 #ifndef LEMON_CONCEPT_BPUGRAPH_H
24 #define LEMON_CONCEPT_BPUGRAPH_H
26 #include <lemon/concepts/graph_components.h>
28 #include <lemon/concepts/graph.h>
29 #include <lemon/concepts/ugraph.h>
31 #include <lemon/bits/utility.h>
36 /// \ingroup graph_concepts
38 /// \brief Class describing the concept of Bipartite Undirected Graphs.
40 /// This class describes the common interface of all
41 /// Undirected Bipartite Graphs.
43 /// As all concept describing classes it provides only interface
44 /// without any sensible implementation. So any algorithm for
45 /// bipartite undirected graph should compile with this class, but it
46 /// will not run properly, of course.
48 /// In LEMON bipartite undirected graphs also fulfill the concept of
49 /// the undirected graphs (\ref lemon::concepts::UGraph "UGraph Concept").
51 /// You can assume that all undirected bipartite graph can be handled
52 /// as an undirected graph and consequently as a static graph.
54 /// The bipartite graph stores two types of nodes which are named
55 /// ANode and BNode. The graph type contains two types ANode and
56 /// BNode which are inherited from Node type. Moreover they have
57 /// constructor which converts Node to either ANode or BNode when
58 /// it is possible. Therefor everywhere the Node type can be used
59 /// instead of ANode and BNode. So the usage of the ANode and
60 /// BNode is not suggested.
62 /// The iteration on the partition can be done with the ANodeIt and
63 /// BNodeIt classes. The node map can be used to map values to the nodes
64 /// and similarly we can use to map values for just the ANodes and
65 /// BNodes the ANodeMap and BNodeMap template classes.
69 /// \brief The undirected graph should be tagged by the
72 /// The undirected graph should be tagged by the UndirectedTag. This
73 /// tag helps the enable_if technics to make compile time
74 /// specializations for undirected graphs.
75 typedef True UndirectedTag;
77 /// \brief The base type of node iterators,
78 /// or in other words, the trivial node iterator.
80 /// This is the base type of each node iterator,
81 /// thus each kind of node iterator converts to this.
82 /// More precisely each kind of node iterator should be inherited
83 /// from the trivial node iterator. The Node class represents
84 /// both of two types of nodes.
87 /// Default constructor
89 /// @warning The default constructor sets the iterator
90 /// to an undefined value.
98 /// Invalid constructor \& conversion.
100 /// This constructor initializes the iterator to be invalid.
101 /// \sa Invalid for more details.
103 /// Equality operator
105 /// Two iterators are equal if and only if they point to the
106 /// same object or both are invalid.
107 bool operator==(Node) const { return true; }
109 /// Inequality operator
111 /// \sa operator==(Node n)
113 bool operator!=(Node) const { return true; }
115 /// Artificial ordering operator.
117 /// To allow the use of graph descriptors as key type in std::map or
118 /// similar associative container we require this.
120 /// \note This operator only have to define some strict ordering of
121 /// the items; this order has nothing to do with the iteration
122 /// ordering of the items.
123 bool operator<(Node) const { return false; }
127 /// \brief Helper class for ANodes.
129 /// This class is just a helper class for ANodes, it is not
130 /// suggested to use it directly. It can be converted easily to
131 /// node and vice versa. The usage of this class is limited
132 /// to use just as template parameters for special map types.
133 class ANode : public Node {
135 /// Default constructor
137 /// @warning The default constructor sets the iterator
138 /// to an undefined value.
140 /// Copy constructor.
142 /// Copy constructor.
144 ANode(const ANode&) : Node() { }
146 /// Construct the same node as ANode.
148 /// Construct the same node as ANode. It may throws assertion
149 /// when the given node is from the BNode set.
150 ANode(const Node&) : Node() { }
152 /// Assign node to A-node.
154 /// Besides the core graph item functionality each node should
155 /// be convertible to the represented A-node if it is it possible.
156 ANode& operator=(const Node&) { return *this; }
158 /// Invalid constructor \& conversion.
160 /// This constructor initializes the iterator to be invalid.
161 /// \sa Invalid for more details.
163 /// Equality operator
165 /// Two iterators are equal if and only if they point to the
166 /// same object or both are invalid.
167 bool operator==(ANode) const { return true; }
169 /// Inequality operator
171 /// \sa operator==(ANode n)
173 bool operator!=(ANode) const { return true; }
175 /// Artificial ordering operator.
177 /// To allow the use of graph descriptors as key type in std::map or
178 /// similar associative container we require this.
180 /// \note This operator only have to define some strict ordering of
181 /// the items; this order has nothing to do with the iteration
182 /// ordering of the items.
183 bool operator<(ANode) const { return false; }
187 /// \brief Helper class for BNodes.
189 /// This class is just a helper class for BNodes, it is not
190 /// suggested to use it directly. It can be converted easily to
191 /// node and vice versa. The usage of this class is limited
192 /// to use just as template parameters for special map types.
193 class BNode : public Node {
195 /// Default constructor
197 /// @warning The default constructor sets the iterator
198 /// to an undefined value.
200 /// Copy constructor.
202 /// Copy constructor.
204 BNode(const BNode&) : Node() { }
206 /// Construct the same node as BNode.
208 /// Construct the same node as BNode. It may throws assertion
209 /// when the given node is from the ANode set.
210 BNode(const Node&) : Node() { }
212 /// Assign node to B-node.
214 /// Besides the core graph item functionality each node should
215 /// be convertible to the represented B-node if it is it possible.
216 BNode& operator=(const Node&) { return *this; }
218 /// Invalid constructor \& conversion.
220 /// This constructor initializes the iterator to be invalid.
221 /// \sa Invalid for more details.
223 /// Equality operator
225 /// Two iterators are equal if and only if they point to the
226 /// same object or both are invalid.
227 bool operator==(BNode) const { return true; }
229 /// Inequality operator
231 /// \sa operator==(BNode n)
233 bool operator!=(BNode) const { return true; }
235 /// Artificial ordering operator.
237 /// To allow the use of graph descriptors as key type in std::map or
238 /// similar associative container we require this.
240 /// \note This operator only have to define some strict ordering of
241 /// the items; this order has nothing to do with the iteration
242 /// ordering of the items.
243 bool operator<(BNode) const { return false; }
247 /// This iterator goes through each node.
249 /// This iterator goes through each node.
250 /// Its usage is quite simple, for example you can count the number
251 /// of nodes in graph \c g of type \c Graph like this:
254 /// for (Graph::NodeIt n(g); n!=INVALID; ++n) ++count;
256 class NodeIt : public Node {
258 /// Default constructor
260 /// @warning The default constructor sets the iterator
261 /// to an undefined value.
263 /// Copy constructor.
265 /// Copy constructor.
267 NodeIt(const NodeIt& n) : Node(n) { }
268 /// Invalid constructor \& conversion.
270 /// Initialize the iterator to be invalid.
271 /// \sa Invalid for more details.
273 /// Sets the iterator to the first node.
275 /// Sets the iterator to the first node of \c g.
277 NodeIt(const BpUGraph&) { }
278 /// Node -> NodeIt conversion.
280 /// Sets the iterator to the node of \c the graph pointed by
281 /// the trivial iterator.
282 /// This feature necessitates that each time we
283 /// iterate the edge-set, the iteration order is the same.
284 NodeIt(const BpUGraph&, const Node&) { }
287 /// Assign the iterator to the next node.
289 NodeIt& operator++() { return *this; }
292 /// This iterator goes through each ANode.
294 /// This iterator goes through each ANode.
295 /// Its usage is quite simple, for example you can count the number
296 /// of nodes in graph \c g of type \c Graph like this:
299 /// for (Graph::ANodeIt n(g); n!=INVALID; ++n) ++count;
301 class ANodeIt : public Node {
303 /// Default constructor
305 /// @warning The default constructor sets the iterator
306 /// to an undefined value.
308 /// Copy constructor.
310 /// Copy constructor.
312 ANodeIt(const ANodeIt& n) : Node(n) { }
313 /// Invalid constructor \& conversion.
315 /// Initialize the iterator to be invalid.
316 /// \sa Invalid for more details.
318 /// Sets the iterator to the first node.
320 /// Sets the iterator to the first node of \c g.
322 ANodeIt(const BpUGraph&) { }
323 /// Node -> ANodeIt conversion.
325 /// Sets the iterator to the node of \c the graph pointed by
326 /// the trivial iterator.
327 /// This feature necessitates that each time we
328 /// iterate the edge-set, the iteration order is the same.
329 ANodeIt(const BpUGraph&, const Node&) { }
332 /// Assign the iterator to the next node.
334 ANodeIt& operator++() { return *this; }
337 /// This iterator goes through each BNode.
339 /// This iterator goes through each BNode.
340 /// Its usage is quite simple, for example you can count the number
341 /// of nodes in graph \c g of type \c Graph like this:
344 /// for (Graph::BNodeIt n(g); n!=INVALID; ++n) ++count;
346 class BNodeIt : public Node {
348 /// Default constructor
350 /// @warning The default constructor sets the iterator
351 /// to an undefined value.
353 /// Copy constructor.
355 /// Copy constructor.
357 BNodeIt(const BNodeIt& n) : Node(n) { }
358 /// Invalid constructor \& conversion.
360 /// Initialize the iterator to be invalid.
361 /// \sa Invalid for more details.
363 /// Sets the iterator to the first node.
365 /// Sets the iterator to the first node of \c g.
367 BNodeIt(const BpUGraph&) { }
368 /// Node -> BNodeIt conversion.
370 /// Sets the iterator to the node of \c the graph pointed by
371 /// the trivial iterator.
372 /// This feature necessitates that each time we
373 /// iterate the edge-set, the iteration order is the same.
374 BNodeIt(const BpUGraph&, const Node&) { }
377 /// Assign the iterator to the next node.
379 BNodeIt& operator++() { return *this; }
383 /// The base type of the undirected edge iterators.
385 /// The base type of the undirected edge iterators.
389 /// Default constructor
391 /// @warning The default constructor sets the iterator
392 /// to an undefined value.
394 /// Copy constructor.
396 /// Copy constructor.
398 UEdge(const UEdge&) { }
399 /// Initialize the iterator to be invalid.
401 /// Initialize the iterator to be invalid.
404 /// Equality operator
406 /// Two iterators are equal if and only if they point to the
407 /// same object or both are invalid.
408 bool operator==(UEdge) const { return true; }
409 /// Inequality operator
411 /// \sa operator==(UEdge n)
413 bool operator!=(UEdge) const { return true; }
415 /// Artificial ordering operator.
417 /// To allow the use of graph descriptors as key type in std::map or
418 /// similar associative container we require this.
420 /// \note This operator only have to define some strict ordering of
421 /// the items; this order has nothing to do with the iteration
422 /// ordering of the items.
423 bool operator<(UEdge) const { return false; }
426 /// This iterator goes through each undirected edge.
428 /// This iterator goes through each undirected edge of a graph.
429 /// Its usage is quite simple, for example you can count the number
430 /// of undirected edges in a graph \c g of type \c Graph as follows:
433 /// for(Graph::UEdgeIt e(g); e!=INVALID; ++e) ++count;
435 class UEdgeIt : public UEdge {
437 /// Default constructor
439 /// @warning The default constructor sets the iterator
440 /// to an undefined value.
442 /// Copy constructor.
444 /// Copy constructor.
446 UEdgeIt(const UEdgeIt& e) : UEdge(e) { }
447 /// Initialize the iterator to be invalid.
449 /// Initialize the iterator to be invalid.
452 /// This constructor sets the iterator to the first undirected edge.
454 /// This constructor sets the iterator to the first undirected edge.
455 UEdgeIt(const BpUGraph&) { }
456 /// UEdge -> UEdgeIt conversion
458 /// Sets the iterator to the value of the trivial iterator.
459 /// This feature necessitates that each time we
460 /// iterate the undirected edge-set, the iteration order is the
462 UEdgeIt(const BpUGraph&, const UEdge&) { }
463 /// Next undirected edge
465 /// Assign the iterator to the next undirected edge.
466 UEdgeIt& operator++() { return *this; }
469 /// \brief This iterator goes trough the incident undirected
472 /// This iterator goes trough the incident undirected edges
473 /// of a certain node
475 /// Its usage is quite simple, for example you can compute the
476 /// degree (i.e. count the number
477 /// of incident edges of a node \c n
478 /// in graph \c g of type \c Graph as follows.
481 /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
483 class IncEdgeIt : public UEdge {
485 /// Default constructor
487 /// @warning The default constructor sets the iterator
488 /// to an undefined value.
490 /// Copy constructor.
492 /// Copy constructor.
494 IncEdgeIt(const IncEdgeIt& e) : UEdge(e) { }
495 /// Initialize the iterator to be invalid.
497 /// Initialize the iterator to be invalid.
499 IncEdgeIt(Invalid) { }
500 /// This constructor sets the iterator to first incident edge.
502 /// This constructor set the iterator to the first incident edge of
504 IncEdgeIt(const BpUGraph&, const Node&) { }
505 /// UEdge -> IncEdgeIt conversion
507 /// Sets the iterator to the value of the trivial iterator \c e.
508 /// This feature necessitates that each time we
509 /// iterate the edge-set, the iteration order is the same.
510 IncEdgeIt(const BpUGraph&, const UEdge&) { }
511 /// Next incident edge
513 /// Assign the iterator to the next incident edge
514 /// of the corresponding node.
515 IncEdgeIt& operator++() { return *this; }
518 /// The directed edge type.
520 /// The directed edge type. It can be converted to the
522 class Edge : public UEdge {
524 /// Default constructor
526 /// @warning The default constructor sets the iterator
527 /// to an undefined value.
529 /// Copy constructor.
531 /// Copy constructor.
533 Edge(const Edge& e) : UEdge(e) { }
534 /// Initialize the iterator to be invalid.
536 /// Initialize the iterator to be invalid.
539 /// Equality operator
541 /// Two iterators are equal if and only if they point to the
542 /// same object or both are invalid.
543 bool operator==(Edge) const { return true; }
544 /// Inequality operator
546 /// \sa operator==(Edge n)
548 bool operator!=(Edge) const { return true; }
550 /// Artificial ordering operator.
552 /// To allow the use of graph descriptors as key type in std::map or
553 /// similar associative container we require this.
555 /// \note This operator only have to define some strict ordering of
556 /// the items; this order has nothing to do with the iteration
557 /// ordering of the items.
558 bool operator<(Edge) const { return false; }
561 /// This iterator goes through each directed edge.
563 /// This iterator goes through each edge of a graph.
564 /// Its usage is quite simple, for example you can count the number
565 /// of edges in a graph \c g of type \c Graph as follows:
568 /// for(Graph::EdgeIt e(g); e!=INVALID; ++e) ++count;
570 class EdgeIt : public Edge {
572 /// Default constructor
574 /// @warning The default constructor sets the iterator
575 /// to an undefined value.
577 /// Copy constructor.
579 /// Copy constructor.
581 EdgeIt(const EdgeIt& e) : Edge(e) { }
582 /// Initialize the iterator to be invalid.
584 /// Initialize the iterator to be invalid.
587 /// This constructor sets the iterator to the first edge.
589 /// This constructor sets the iterator to the first edge of \c g.
590 ///@param g the graph
591 EdgeIt(const BpUGraph &g) { ignore_unused_variable_warning(g); }
592 /// Edge -> EdgeIt conversion
594 /// Sets the iterator to the value of the trivial iterator \c e.
595 /// This feature necessitates that each time we
596 /// iterate the edge-set, the iteration order is the same.
597 EdgeIt(const BpUGraph&, const Edge&) { }
600 /// Assign the iterator to the next edge.
601 EdgeIt& operator++() { return *this; }
604 /// This iterator goes trough the outgoing directed edges of a node.
606 /// This iterator goes trough the \e outgoing edges of a certain node
608 /// Its usage is quite simple, for example you can count the number
609 /// of outgoing edges of a node \c n
610 /// in graph \c g of type \c Graph as follows.
613 /// for (Graph::OutEdgeIt e(g, n); e!=INVALID; ++e) ++count;
616 class OutEdgeIt : public Edge {
618 /// Default constructor
620 /// @warning The default constructor sets the iterator
621 /// to an undefined value.
623 /// Copy constructor.
625 /// Copy constructor.
627 OutEdgeIt(const OutEdgeIt& e) : Edge(e) { }
628 /// Initialize the iterator to be invalid.
630 /// Initialize the iterator to be invalid.
632 OutEdgeIt(Invalid) { }
633 /// This constructor sets the iterator to the first outgoing edge.
635 /// This constructor sets the iterator to the first outgoing edge of
638 ///@param g the graph
639 OutEdgeIt(const BpUGraph& n, const Node& g) {
640 ignore_unused_variable_warning(n);
641 ignore_unused_variable_warning(g);
643 /// Edge -> OutEdgeIt conversion
645 /// Sets the iterator to the value of the trivial iterator.
646 /// This feature necessitates that each time we
647 /// iterate the edge-set, the iteration order is the same.
648 OutEdgeIt(const BpUGraph&, const Edge&) { }
649 ///Next outgoing edge
651 /// Assign the iterator to the next
652 /// outgoing edge of the corresponding node.
653 OutEdgeIt& operator++() { return *this; }
656 /// This iterator goes trough the incoming directed edges of a node.
658 /// This iterator goes trough the \e incoming edges of a certain node
660 /// Its usage is quite simple, for example you can count the number
661 /// of outgoing edges of a node \c n
662 /// in graph \c g of type \c Graph as follows.
665 /// for(Graph::InEdgeIt e(g, n); e!=INVALID; ++e) ++count;
668 class InEdgeIt : public Edge {
670 /// Default constructor
672 /// @warning The default constructor sets the iterator
673 /// to an undefined value.
675 /// Copy constructor.
677 /// Copy constructor.
679 InEdgeIt(const InEdgeIt& e) : Edge(e) { }
680 /// Initialize the iterator to be invalid.
682 /// Initialize the iterator to be invalid.
684 InEdgeIt(Invalid) { }
685 /// This constructor sets the iterator to first incoming edge.
687 /// This constructor set the iterator to the first incoming edge of
690 ///@param g the graph
691 InEdgeIt(const BpUGraph& g, const Node& n) {
692 ignore_unused_variable_warning(n);
693 ignore_unused_variable_warning(g);
695 /// Edge -> InEdgeIt conversion
697 /// Sets the iterator to the value of the trivial iterator \c e.
698 /// This feature necessitates that each time we
699 /// iterate the edge-set, the iteration order is the same.
700 InEdgeIt(const BpUGraph&, const Edge&) { }
701 /// Next incoming edge
703 /// Assign the iterator to the next inedge of the corresponding node.
705 InEdgeIt& operator++() { return *this; }
708 /// \brief Read write map of the nodes to type \c T.
710 /// ReadWrite map of the nodes to type \c T.
712 /// \todo Wrong documentation
714 class NodeMap : public ReadWriteMap< Node, T >
719 NodeMap(const BpUGraph&) { }
721 NodeMap(const BpUGraph&, T) { }
724 NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
725 ///Assignment operator
726 NodeMap& operator=(const NodeMap&) { return *this; }
727 ///Assignment operator
728 template <typename CMap>
729 NodeMap& operator=(const CMap&) {
730 checkConcept<ReadMap<Node, T>, CMap>();
735 /// \brief Read write map of the ANodes to type \c T.
737 /// ReadWrite map of the ANodes to type \c T.
739 /// \todo Wrong documentation
741 class ANodeMap : public ReadWriteMap< Node, T >
746 ANodeMap(const BpUGraph&) { }
748 ANodeMap(const BpUGraph&, T) { }
751 ANodeMap(const ANodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
752 ///Assignment operator
753 ANodeMap& operator=(const ANodeMap&) { return *this; }
754 ///Assignment operator
755 template <typename CMap>
756 ANodeMap& operator=(const CMap&) {
757 checkConcept<ReadMap<Node, T>, CMap>();
762 /// \brief Read write map of the BNodes to type \c T.
764 /// ReadWrite map of the BNodes to type \c T.
766 /// \todo Wrong documentation
768 class BNodeMap : public ReadWriteMap< Node, T >
773 BNodeMap(const BpUGraph&) { }
775 BNodeMap(const BpUGraph&, T) { }
778 BNodeMap(const BNodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
779 ///Assignment operator
780 BNodeMap& operator=(const BNodeMap&) { return *this; }
781 ///Assignment operator
782 template <typename CMap>
783 BNodeMap& operator=(const CMap&) {
784 checkConcept<ReadMap<Node, T>, CMap>();
789 /// \brief Read write map of the directed edges to type \c T.
791 /// Reference map of the directed edges to type \c T.
793 /// \todo Wrong documentation
795 class EdgeMap : public ReadWriteMap<Edge,T>
800 EdgeMap(const BpUGraph&) { }
802 EdgeMap(const BpUGraph&, T) { }
804 EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) { }
805 ///Assignment operator
806 EdgeMap& operator=(const EdgeMap&) { return *this; }
807 ///Assignment operator
808 template <typename CMap>
809 EdgeMap& operator=(const CMap&) {
810 checkConcept<ReadMap<Edge, T>, CMap>();
815 /// Read write map of the undirected edges to type \c T.
817 /// Reference map of the edges to type \c T.
819 /// \todo Wrong documentation
821 class UEdgeMap : public ReadWriteMap<UEdge,T>
826 UEdgeMap(const BpUGraph&) { }
828 UEdgeMap(const BpUGraph&, T) { }
830 UEdgeMap(const UEdgeMap& em) : ReadWriteMap<UEdge,T>(em) {}
831 ///Assignment operator
832 UEdgeMap &operator=(const UEdgeMap&) { return *this; }
833 ///Assignment operator
834 template <typename CMap>
835 UEdgeMap& operator=(const CMap&) {
836 checkConcept<ReadMap<UEdge, T>, CMap>();
841 /// \brief Direct the given undirected edge.
843 /// Direct the given undirected edge. The returned edge source
844 /// will be the given node.
845 Edge direct(const UEdge&, const Node&) const {
849 /// \brief Direct the given undirected edge.
851 /// Direct the given undirected edge. The returned edge
852 /// represents the given undirected edge and the direction comes
853 /// from the given bool. The source of the undirected edge and
854 /// the directed edge is the same when the given bool is true.
855 Edge direct(const UEdge&, bool) const {
859 /// \brief Returns true when the given node is an ANode.
861 /// Returns true when the given node is an ANode.
862 bool aNode(Node) const { return true;}
864 /// \brief Returns true when the given node is an BNode.
866 /// Returns true when the given node is an BNode.
867 bool bNode(Node) const { return true;}
869 /// \brief Returns the edge's end node which is in the ANode set.
871 /// Returns the edge's end node which is in the ANode set.
872 Node aNode(UEdge) const { return INVALID;}
874 /// \brief Returns the edge's end node which is in the BNode set.
876 /// Returns the edge's end node which is in the BNode set.
877 Node bNode(UEdge) const { return INVALID;}
879 /// \brief Returns true if the edge has default orientation.
881 /// Returns whether the given directed edge is same orientation as
882 /// the corresponding undirected edge's default orientation.
883 bool direction(Edge) const { return true; }
885 /// \brief Returns the opposite directed edge.
887 /// Returns the opposite directed edge.
888 Edge oppositeEdge(Edge) const { return INVALID; }
890 /// \brief Opposite node on an edge
892 /// \return the opposite of the given Node on the given UEdge
893 Node oppositeNode(Node, UEdge) const { return INVALID; }
895 /// \brief First node of the undirected edge.
897 /// \return the first node of the given UEdge.
899 /// Naturally undirected edges don't have direction and thus
900 /// don't have source and target node. But we use these two methods
901 /// to query the two endnodes of the edge. The direction of the edge
902 /// which arises this way is called the inherent direction of the
903 /// undirected edge, and is used to define the "default" direction
904 /// of the directed versions of the edges.
906 Node source(UEdge) const { return INVALID; }
908 /// \brief Second node of the undirected edge.
909 Node target(UEdge) const { return INVALID; }
911 /// \brief Source node of the directed edge.
912 Node source(Edge) const { return INVALID; }
914 /// \brief Target node of the directed edge.
915 Node target(Edge) const { return INVALID; }
917 /// \brief Base node of the iterator
919 /// Returns the base node (the source in this case) of the iterator
920 Node baseNode(OutEdgeIt e) const {
924 /// \brief Running node of the iterator
926 /// Returns the running node (the target in this case) of the
928 Node runningNode(OutEdgeIt e) const {
932 /// \brief Base node of the iterator
934 /// Returns the base node (the target in this case) of the iterator
935 Node baseNode(InEdgeIt e) const {
938 /// \brief Running node of the iterator
940 /// Returns the running node (the source in this case) of the
942 Node runningNode(InEdgeIt e) const {
946 /// \brief Base node of the iterator
948 /// Returns the base node of the iterator
949 Node baseNode(IncEdgeIt) const {
953 /// \brief Running node of the iterator
955 /// Returns the running node of the iterator
956 Node runningNode(IncEdgeIt) const {
960 void first(Node&) const {}
961 void next(Node&) const {}
963 void first(Edge&) const {}
964 void next(Edge&) const {}
966 void first(UEdge&) const {}
967 void next(UEdge&) const {}
969 void firstANode(Node&) const {}
970 void nextANode(Node&) const {}
972 void firstBNode(Node&) const {}
973 void nextBNode(Node&) const {}
975 void firstIn(Edge&, const Node&) const {}
976 void nextIn(Edge&) const {}
978 void firstOut(Edge&, const Node&) const {}
979 void nextOut(Edge&) const {}
981 void firstInc(UEdge &, bool &, const Node &) const {}
982 void nextInc(UEdge &, bool &) const {}
984 void firstFromANode(UEdge&, const Node&) const {}
985 void nextFromANode(UEdge&) const {}
987 void firstFromBNode(UEdge&, const Node&) const {}
988 void nextFromBNode(UEdge&) const {}
990 template <typename Graph>
993 checkConcept<IterableBpUGraphComponent<>, Graph>();
994 checkConcept<MappableBpUGraphComponent<>, Graph>();