equal
deleted
inserted
replaced
1 /* -*- mode: C++; indent-tabs-mode: nil; -*- |
1 /* -*- mode: C++; indent-tabs-mode: nil; -*- |
2 * |
2 * |
3 * This file is a part of LEMON, a generic C++ optimization library. |
3 * This file is a part of LEMON, a generic C++ optimization library. |
4 * |
4 * |
5 * Copyright (C) 2003-2009 |
5 * Copyright (C) 2003-2010 |
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 * (Egervary Research Group on Combinatorial Optimization, EGRES). |
7 * (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 * |
8 * |
9 * Permission to use, modify and distribute this software is granted |
9 * Permission to use, modify and distribute this software is granted |
10 * provided that this copyright notice appears in all copies. For |
10 * provided that this copyright notice appears in all copies. For |
122 if (u != v) g.addArc(u, v); |
122 if (u != v) g.addArc(u, v); |
123 \endcode |
123 \endcode |
124 |
124 |
125 \note Contrary to the iterators in the C++ Standard Template Library (STL), |
125 \note Contrary to the iterators in the C++ Standard Template Library (STL), |
126 LEMON iterators are convertible to the corresponding |
126 LEMON iterators are convertible to the corresponding |
127 item types without having to use \c %operator*(). This is not confusing, since the |
127 item types without having to use \c %operator*(). This is not confusing, |
128 program context always indicates whether we refer to the iterator or to the graph |
128 since the program context always indicates whether we refer to the iterator |
129 item (they do not have conflicting functionalities). |
129 or to the graph item (they do not have conflicting functionalities). |
130 |
130 |
131 The graph items are also ordered by the 'less than' operator (with respect to |
131 The graph items are also ordered by the 'less than' operator (with respect to |
132 their integer identifiers). For example, this code will add only one of the |
132 their integer identifiers). For example, this code will add only one of the |
133 opposite arcs. |
133 opposite arcs. |
134 |
134 |
152 cnt++; |
152 cnt++; |
153 std::cout << "Number of arcs: " << cnt << std::endl; |
153 std::cout << "Number of arcs: " << cnt << std::endl; |
154 \endcode |
154 \endcode |
155 |
155 |
156 Finally, you can also list the arcs starting from or arriving at a |
156 Finally, you can also list the arcs starting from or arriving at a |
157 certain node with |
157 certain node with |
158 \ref concepts::Digraph::OutArcIt "ListDigraph::OutArcIt" |
158 \ref concepts::Digraph::OutArcIt "ListDigraph::OutArcIt" |
159 and |
159 and |
160 \ref concepts::Digraph::InArcIt "ListDigraph::InArcIt". |
160 \ref concepts::Digraph::InArcIt "ListDigraph::InArcIt". |
161 Their usage is the same, but you must also give the node to the constructor. |
161 Their usage is the same, but you must also give the node to the constructor. |
162 |
162 |