lemongraph 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +8 -0
- data/LICENSE +674 -0
- data/README.md +6 -0
- data/ext/lemon-1.3.1/AUTHORS +26 -0
- data/ext/lemon-1.3.1/CMakeLists.txt +371 -0
- data/ext/lemon-1.3.1/INSTALL +167 -0
- data/ext/lemon-1.3.1/LICENSE +32 -0
- data/ext/lemon-1.3.1/NEWS +337 -0
- data/ext/lemon-1.3.1/README +50 -0
- data/ext/lemon-1.3.1/cmake/FindCOIN.cmake +110 -0
- data/ext/lemon-1.3.1/cmake/FindGLPK.cmake +55 -0
- data/ext/lemon-1.3.1/cmake/FindGhostscript.cmake +10 -0
- data/ext/lemon-1.3.1/cmake/FindILOG.cmake +102 -0
- data/ext/lemon-1.3.1/cmake/FindSOPLEX.cmake +23 -0
- data/ext/lemon-1.3.1/cmake/LEMONConfig.cmake.in +13 -0
- data/ext/lemon-1.3.1/cmake/nsis/lemon.ico +0 -0
- data/ext/lemon-1.3.1/cmake/nsis/uninstall.ico +0 -0
- data/ext/lemon-1.3.1/cmake/version.cmake +1 -0
- data/ext/lemon-1.3.1/cmake/version.cmake.in +1 -0
- data/ext/lemon-1.3.1/contrib/CMakeLists.txt +19 -0
- data/ext/lemon-1.3.1/lemon/CMakeLists.txt +91 -0
- data/ext/lemon-1.3.1/lemon/adaptors.h +3638 -0
- data/ext/lemon-1.3.1/lemon/arg_parser.cc +474 -0
- data/ext/lemon-1.3.1/lemon/arg_parser.h +440 -0
- data/ext/lemon-1.3.1/lemon/assert.h +214 -0
- data/ext/lemon-1.3.1/lemon/base.cc +37 -0
- data/ext/lemon-1.3.1/lemon/bellman_ford.h +1116 -0
- data/ext/lemon-1.3.1/lemon/bfs.h +1754 -0
- data/ext/lemon-1.3.1/lemon/bin_heap.h +347 -0
- data/ext/lemon-1.3.1/lemon/binomial_heap.h +445 -0
- data/ext/lemon-1.3.1/lemon/bits/alteration_notifier.h +472 -0
- data/ext/lemon-1.3.1/lemon/bits/array_map.h +351 -0
- data/ext/lemon-1.3.1/lemon/bits/bezier.h +174 -0
- data/ext/lemon-1.3.1/lemon/bits/default_map.h +182 -0
- data/ext/lemon-1.3.1/lemon/bits/edge_set_extender.h +627 -0
- data/ext/lemon-1.3.1/lemon/bits/enable_if.h +131 -0
- data/ext/lemon-1.3.1/lemon/bits/graph_adaptor_extender.h +401 -0
- data/ext/lemon-1.3.1/lemon/bits/graph_extender.h +1332 -0
- data/ext/lemon-1.3.1/lemon/bits/lock.h +65 -0
- data/ext/lemon-1.3.1/lemon/bits/map_extender.h +332 -0
- data/ext/lemon-1.3.1/lemon/bits/path_dump.h +177 -0
- data/ext/lemon-1.3.1/lemon/bits/solver_bits.h +194 -0
- data/ext/lemon-1.3.1/lemon/bits/traits.h +388 -0
- data/ext/lemon-1.3.1/lemon/bits/variant.h +494 -0
- data/ext/lemon-1.3.1/lemon/bits/vector_map.h +244 -0
- data/ext/lemon-1.3.1/lemon/bits/windows.cc +166 -0
- data/ext/lemon-1.3.1/lemon/bits/windows.h +44 -0
- data/ext/lemon-1.3.1/lemon/bucket_heap.h +594 -0
- data/ext/lemon-1.3.1/lemon/capacity_scaling.h +1014 -0
- data/ext/lemon-1.3.1/lemon/cbc.cc +460 -0
- data/ext/lemon-1.3.1/lemon/cbc.h +129 -0
- data/ext/lemon-1.3.1/lemon/christofides_tsp.h +254 -0
- data/ext/lemon-1.3.1/lemon/circulation.h +807 -0
- data/ext/lemon-1.3.1/lemon/clp.cc +464 -0
- data/ext/lemon-1.3.1/lemon/clp.h +164 -0
- data/ext/lemon-1.3.1/lemon/color.cc +44 -0
- data/ext/lemon-1.3.1/lemon/color.h +204 -0
- data/ext/lemon-1.3.1/lemon/concept_check.h +77 -0
- data/ext/lemon-1.3.1/lemon/concepts/bpgraph.h +1029 -0
- data/ext/lemon-1.3.1/lemon/concepts/digraph.h +491 -0
- data/ext/lemon-1.3.1/lemon/concepts/graph.h +788 -0
- data/ext/lemon-1.3.1/lemon/concepts/graph_components.h +2134 -0
- data/ext/lemon-1.3.1/lemon/concepts/heap.h +324 -0
- data/ext/lemon-1.3.1/lemon/concepts/maps.h +223 -0
- data/ext/lemon-1.3.1/lemon/concepts/path.h +312 -0
- data/ext/lemon-1.3.1/lemon/config.h.in +22 -0
- data/ext/lemon-1.3.1/lemon/connectivity.h +1688 -0
- data/ext/lemon-1.3.1/lemon/core.h +2506 -0
- data/ext/lemon-1.3.1/lemon/cost_scaling.h +1607 -0
- data/ext/lemon-1.3.1/lemon/counter.h +249 -0
- data/ext/lemon-1.3.1/lemon/cplex.cc +994 -0
- data/ext/lemon-1.3.1/lemon/cplex.h +292 -0
- data/ext/lemon-1.3.1/lemon/cycle_canceling.h +1230 -0
- data/ext/lemon-1.3.1/lemon/dfs.h +1637 -0
- data/ext/lemon-1.3.1/lemon/dheap.h +352 -0
- data/ext/lemon-1.3.1/lemon/dijkstra.h +1303 -0
- data/ext/lemon-1.3.1/lemon/dim2.h +726 -0
- data/ext/lemon-1.3.1/lemon/dimacs.h +448 -0
- data/ext/lemon-1.3.1/lemon/edge_set.h +1420 -0
- data/ext/lemon-1.3.1/lemon/edmonds_karp.h +556 -0
- data/ext/lemon-1.3.1/lemon/elevator.h +982 -0
- data/ext/lemon-1.3.1/lemon/error.h +276 -0
- data/ext/lemon-1.3.1/lemon/euler.h +287 -0
- data/ext/lemon-1.3.1/lemon/fib_heap.h +475 -0
- data/ext/lemon-1.3.1/lemon/fractional_matching.h +2139 -0
- data/ext/lemon-1.3.1/lemon/full_graph.h +1082 -0
- data/ext/lemon-1.3.1/lemon/glpk.cc +1012 -0
- data/ext/lemon-1.3.1/lemon/glpk.h +263 -0
- data/ext/lemon-1.3.1/lemon/gomory_hu.h +568 -0
- data/ext/lemon-1.3.1/lemon/graph_to_eps.h +1186 -0
- data/ext/lemon-1.3.1/lemon/greedy_tsp.h +251 -0
- data/ext/lemon-1.3.1/lemon/grid_graph.h +699 -0
- data/ext/lemon-1.3.1/lemon/grosso_locatelli_pullan_mc.h +840 -0
- data/ext/lemon-1.3.1/lemon/hao_orlin.h +1015 -0
- data/ext/lemon-1.3.1/lemon/hartmann_orlin_mmc.h +654 -0
- data/ext/lemon-1.3.1/lemon/howard_mmc.h +651 -0
- data/ext/lemon-1.3.1/lemon/hypercube_graph.h +459 -0
- data/ext/lemon-1.3.1/lemon/insertion_tsp.h +533 -0
- data/ext/lemon-1.3.1/lemon/karp_mmc.h +590 -0
- data/ext/lemon-1.3.1/lemon/kruskal.h +324 -0
- data/ext/lemon-1.3.1/lemon/lemon.pc.in +10 -0
- data/ext/lemon-1.3.1/lemon/lgf_reader.h +3854 -0
- data/ext/lemon-1.3.1/lemon/lgf_writer.h +2687 -0
- data/ext/lemon-1.3.1/lemon/list_graph.h +2510 -0
- data/ext/lemon-1.3.1/lemon/lp.h +95 -0
- data/ext/lemon-1.3.1/lemon/lp_base.cc +30 -0
- data/ext/lemon-1.3.1/lemon/lp_base.h +2147 -0
- data/ext/lemon-1.3.1/lemon/lp_skeleton.cc +143 -0
- data/ext/lemon-1.3.1/lemon/lp_skeleton.h +234 -0
- data/ext/lemon-1.3.1/lemon/maps.h +4057 -0
- data/ext/lemon-1.3.1/lemon/matching.h +3505 -0
- data/ext/lemon-1.3.1/lemon/math.h +77 -0
- data/ext/lemon-1.3.1/lemon/max_cardinality_search.h +794 -0
- data/ext/lemon-1.3.1/lemon/min_cost_arborescence.h +808 -0
- data/ext/lemon-1.3.1/lemon/nagamochi_ibaraki.h +702 -0
- data/ext/lemon-1.3.1/lemon/nauty_reader.h +113 -0
- data/ext/lemon-1.3.1/lemon/nearest_neighbor_tsp.h +238 -0
- data/ext/lemon-1.3.1/lemon/network_simplex.h +1659 -0
- data/ext/lemon-1.3.1/lemon/opt2_tsp.h +367 -0
- data/ext/lemon-1.3.1/lemon/pairing_heap.h +474 -0
- data/ext/lemon-1.3.1/lemon/path.h +1164 -0
- data/ext/lemon-1.3.1/lemon/planarity.h +2754 -0
- data/ext/lemon-1.3.1/lemon/preflow.h +985 -0
- data/ext/lemon-1.3.1/lemon/quad_heap.h +343 -0
- data/ext/lemon-1.3.1/lemon/radix_heap.h +438 -0
- data/ext/lemon-1.3.1/lemon/radix_sort.h +487 -0
- data/ext/lemon-1.3.1/lemon/random.cc +29 -0
- data/ext/lemon-1.3.1/lemon/random.h +1005 -0
- data/ext/lemon-1.3.1/lemon/smart_graph.h +1344 -0
- data/ext/lemon-1.3.1/lemon/soplex.cc +465 -0
- data/ext/lemon-1.3.1/lemon/soplex.h +158 -0
- data/ext/lemon-1.3.1/lemon/static_graph.h +476 -0
- data/ext/lemon-1.3.1/lemon/suurballe.h +776 -0
- data/ext/lemon-1.3.1/lemon/time_measure.h +610 -0
- data/ext/lemon-1.3.1/lemon/tolerance.h +242 -0
- data/ext/lemon-1.3.1/lemon/unionfind.h +1824 -0
- data/ext/lemon-1.3.1/scripts/unify-sources.sh +390 -0
- data/ext/lemon-1.3.1/scripts/valgrind-wrapper.sh +22 -0
- data/ext/lemongraph/arc_map.cc +1007 -0
- data/ext/lemongraph/digraph.cc +282 -0
- data/ext/lemongraph/digraph_arc.cc +153 -0
- data/ext/lemongraph/digraph_node.cc +277 -0
- data/ext/lemongraph/edge_map.cc +770 -0
- data/ext/lemongraph/extconf.rb +53 -0
- data/ext/lemongraph/graph.cc +351 -0
- data/ext/lemongraph/graph_arc.cc +95 -0
- data/ext/lemongraph/graph_edge.cc +153 -0
- data/ext/lemongraph/graph_item.cc +76 -0
- data/ext/lemongraph/graph_node.cc +321 -0
- data/ext/lemongraph/lemongraph.cc +260 -0
- data/ext/lemongraph/lemongraph.hh +295 -0
- data/ext/lemongraph/lemongraph.map +6 -0
- data/ext/lemongraph/lemongraph_export.hh +31 -0
- data/ext/lemongraph/node_map.cc +1011 -0
- data/lemongraph.gemspec +176 -0
- data/lib/lemongraph/graphviz.rb +240 -0
- data/lib/lemongraph/version.rb +4 -0
- data/lib/lemongraph.rb +21 -0
- data/samples/lemondeps.rb +38 -0
- metadata +202 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/* -*- mode: C++; indent-tabs-mode: nil; -*-
|
|
2
|
+
*
|
|
3
|
+
* This file is a part of LEMON, a generic C++ optimization library.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2003-2013
|
|
6
|
+
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
|
|
7
|
+
* (Egervary Research Group on Combinatorial Optimization, EGRES).
|
|
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
|
+
|
|
19
|
+
///\ingroup concept
|
|
20
|
+
///\file
|
|
21
|
+
///\brief The concept of paths
|
|
22
|
+
///
|
|
23
|
+
|
|
24
|
+
#ifndef LEMON_CONCEPTS_PATH_H
|
|
25
|
+
#define LEMON_CONCEPTS_PATH_H
|
|
26
|
+
|
|
27
|
+
#include <lemon/core.h>
|
|
28
|
+
#include <lemon/concept_check.h>
|
|
29
|
+
|
|
30
|
+
namespace lemon {
|
|
31
|
+
namespace concepts {
|
|
32
|
+
|
|
33
|
+
/// \addtogroup concept
|
|
34
|
+
/// @{
|
|
35
|
+
|
|
36
|
+
/// \brief A skeleton structure for representing directed paths in
|
|
37
|
+
/// a digraph.
|
|
38
|
+
///
|
|
39
|
+
/// A skeleton structure for representing directed paths in a
|
|
40
|
+
/// digraph.
|
|
41
|
+
/// In a sense, a path can be treated as a list of arcs.
|
|
42
|
+
/// LEMON path types just store this list. As a consequence, they cannot
|
|
43
|
+
/// enumerate the nodes on the path directly and a zero length path
|
|
44
|
+
/// cannot store its source node.
|
|
45
|
+
///
|
|
46
|
+
/// The arcs of a path should be stored in the order of their directions,
|
|
47
|
+
/// i.e. the target node of each arc should be the same as the source
|
|
48
|
+
/// node of the next arc. This consistency could be checked using
|
|
49
|
+
/// \ref checkPath().
|
|
50
|
+
/// The source and target nodes of a (consistent) path can be obtained
|
|
51
|
+
/// using \ref pathSource() and \ref pathTarget().
|
|
52
|
+
///
|
|
53
|
+
/// A path can be constructed from another path of any type using the
|
|
54
|
+
/// copy constructor or the assignment operator.
|
|
55
|
+
///
|
|
56
|
+
/// \tparam GR The digraph type in which the path is.
|
|
57
|
+
template <typename GR>
|
|
58
|
+
class Path {
|
|
59
|
+
public:
|
|
60
|
+
|
|
61
|
+
/// Type of the underlying digraph.
|
|
62
|
+
typedef GR Digraph;
|
|
63
|
+
/// Arc type of the underlying digraph.
|
|
64
|
+
typedef typename Digraph::Arc Arc;
|
|
65
|
+
|
|
66
|
+
class ArcIt;
|
|
67
|
+
|
|
68
|
+
/// \brief Default constructor
|
|
69
|
+
Path() {}
|
|
70
|
+
|
|
71
|
+
/// \brief Template copy constructor
|
|
72
|
+
template <typename CPath>
|
|
73
|
+
Path(const CPath& cpath) {}
|
|
74
|
+
|
|
75
|
+
/// \brief Template assigment operator
|
|
76
|
+
template <typename CPath>
|
|
77
|
+
Path& operator=(const CPath& cpath) {
|
|
78
|
+
::lemon::ignore_unused_variable_warning(cpath);
|
|
79
|
+
return *this;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/// Length of the path, i.e. the number of arcs on the path.
|
|
83
|
+
int length() const { return 0;}
|
|
84
|
+
|
|
85
|
+
/// Returns whether the path is empty.
|
|
86
|
+
bool empty() const { return true;}
|
|
87
|
+
|
|
88
|
+
/// Resets the path to an empty path.
|
|
89
|
+
void clear() {}
|
|
90
|
+
|
|
91
|
+
/// \brief LEMON style iterator for enumerating the arcs of a path.
|
|
92
|
+
///
|
|
93
|
+
/// LEMON style iterator class for enumerating the arcs of a path.
|
|
94
|
+
class ArcIt {
|
|
95
|
+
public:
|
|
96
|
+
/// Default constructor
|
|
97
|
+
ArcIt() {}
|
|
98
|
+
/// Invalid constructor
|
|
99
|
+
ArcIt(Invalid) {}
|
|
100
|
+
/// Sets the iterator to the first arc of the given path
|
|
101
|
+
ArcIt(const Path &) {}
|
|
102
|
+
|
|
103
|
+
/// Conversion to \c Arc
|
|
104
|
+
operator Arc() const { return INVALID; }
|
|
105
|
+
|
|
106
|
+
/// Next arc
|
|
107
|
+
ArcIt& operator++() {return *this;}
|
|
108
|
+
|
|
109
|
+
/// Comparison operator
|
|
110
|
+
bool operator==(const ArcIt&) const {return true;}
|
|
111
|
+
/// Comparison operator
|
|
112
|
+
bool operator!=(const ArcIt&) const {return true;}
|
|
113
|
+
/// Comparison operator
|
|
114
|
+
bool operator<(const ArcIt&) const {return false;}
|
|
115
|
+
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
template <typename _Path>
|
|
119
|
+
struct Constraints {
|
|
120
|
+
void constraints() {
|
|
121
|
+
Path<Digraph> pc;
|
|
122
|
+
_Path p, pp(pc);
|
|
123
|
+
int l = p.length();
|
|
124
|
+
int e = p.empty();
|
|
125
|
+
p.clear();
|
|
126
|
+
|
|
127
|
+
p = pc;
|
|
128
|
+
|
|
129
|
+
typename _Path::ArcIt id, ii(INVALID), i(p);
|
|
130
|
+
|
|
131
|
+
++i;
|
|
132
|
+
typename Digraph::Arc ed = i;
|
|
133
|
+
|
|
134
|
+
e = (i == ii);
|
|
135
|
+
e = (i != ii);
|
|
136
|
+
e = (i < ii);
|
|
137
|
+
|
|
138
|
+
::lemon::ignore_unused_variable_warning(l);
|
|
139
|
+
::lemon::ignore_unused_variable_warning(pp);
|
|
140
|
+
::lemon::ignore_unused_variable_warning(e);
|
|
141
|
+
::lemon::ignore_unused_variable_warning(id);
|
|
142
|
+
::lemon::ignore_unused_variable_warning(ii);
|
|
143
|
+
::lemon::ignore_unused_variable_warning(ed);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
namespace _path_bits {
|
|
150
|
+
|
|
151
|
+
template <typename _Digraph, typename _Path, typename RevPathTag = void>
|
|
152
|
+
struct PathDumperConstraints {
|
|
153
|
+
void constraints() {
|
|
154
|
+
int l = p.length();
|
|
155
|
+
int e = p.empty();
|
|
156
|
+
|
|
157
|
+
typename _Path::ArcIt id, i(p);
|
|
158
|
+
|
|
159
|
+
++i;
|
|
160
|
+
typename _Digraph::Arc ed = i;
|
|
161
|
+
|
|
162
|
+
e = (i == INVALID);
|
|
163
|
+
e = (i != INVALID);
|
|
164
|
+
|
|
165
|
+
::lemon::ignore_unused_variable_warning(l);
|
|
166
|
+
::lemon::ignore_unused_variable_warning(e);
|
|
167
|
+
::lemon::ignore_unused_variable_warning(id);
|
|
168
|
+
::lemon::ignore_unused_variable_warning(ed);
|
|
169
|
+
}
|
|
170
|
+
_Path& p;
|
|
171
|
+
PathDumperConstraints() {}
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
template <typename _Digraph, typename _Path>
|
|
175
|
+
struct PathDumperConstraints<
|
|
176
|
+
_Digraph, _Path,
|
|
177
|
+
typename enable_if<typename _Path::RevPathTag, void>::type
|
|
178
|
+
> {
|
|
179
|
+
void constraints() {
|
|
180
|
+
int l = p.length();
|
|
181
|
+
int e = p.empty();
|
|
182
|
+
|
|
183
|
+
typename _Path::RevArcIt id, i(p);
|
|
184
|
+
|
|
185
|
+
++i;
|
|
186
|
+
typename _Digraph::Arc ed = i;
|
|
187
|
+
|
|
188
|
+
e = (i == INVALID);
|
|
189
|
+
e = (i != INVALID);
|
|
190
|
+
|
|
191
|
+
::lemon::ignore_unused_variable_warning(l);
|
|
192
|
+
::lemon::ignore_unused_variable_warning(e);
|
|
193
|
+
::lemon::ignore_unused_variable_warning(id);
|
|
194
|
+
::lemon::ignore_unused_variable_warning(ed);
|
|
195
|
+
}
|
|
196
|
+
_Path& p;
|
|
197
|
+
PathDumperConstraints() {}
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
/// \brief A skeleton structure for path dumpers.
|
|
204
|
+
///
|
|
205
|
+
/// A skeleton structure for path dumpers. The path dumpers are
|
|
206
|
+
/// the generalization of the paths, they can enumerate the arcs
|
|
207
|
+
/// of the path either in forward or in backward order.
|
|
208
|
+
/// These classes are typically not used directly, they are rather
|
|
209
|
+
/// used to be assigned to a real path type.
|
|
210
|
+
///
|
|
211
|
+
/// The main purpose of this concept is that the shortest path
|
|
212
|
+
/// algorithms can enumerate the arcs easily in reverse order.
|
|
213
|
+
/// In LEMON, such algorithms give back a (reverse) path dumper that
|
|
214
|
+
/// can be assigned to a real path. The dumpers can be implemented as
|
|
215
|
+
/// an adaptor class to the predecessor map.
|
|
216
|
+
///
|
|
217
|
+
/// \tparam GR The digraph type in which the path is.
|
|
218
|
+
template <typename GR>
|
|
219
|
+
class PathDumper {
|
|
220
|
+
public:
|
|
221
|
+
|
|
222
|
+
/// Type of the underlying digraph.
|
|
223
|
+
typedef GR Digraph;
|
|
224
|
+
/// Arc type of the underlying digraph.
|
|
225
|
+
typedef typename Digraph::Arc Arc;
|
|
226
|
+
|
|
227
|
+
/// Length of the path, i.e. the number of arcs on the path.
|
|
228
|
+
int length() const { return 0;}
|
|
229
|
+
|
|
230
|
+
/// Returns whether the path is empty.
|
|
231
|
+
bool empty() const { return true;}
|
|
232
|
+
|
|
233
|
+
/// \brief Forward or reverse dumping
|
|
234
|
+
///
|
|
235
|
+
/// If this tag is defined to be \c True, then reverse dumping
|
|
236
|
+
/// is provided in the path dumper. In this case, \c RevArcIt
|
|
237
|
+
/// iterator should be implemented instead of \c ArcIt iterator.
|
|
238
|
+
typedef False RevPathTag;
|
|
239
|
+
|
|
240
|
+
/// \brief LEMON style iterator for enumerating the arcs of a path.
|
|
241
|
+
///
|
|
242
|
+
/// LEMON style iterator class for enumerating the arcs of a path.
|
|
243
|
+
class ArcIt {
|
|
244
|
+
public:
|
|
245
|
+
/// Default constructor
|
|
246
|
+
ArcIt() {}
|
|
247
|
+
/// Invalid constructor
|
|
248
|
+
ArcIt(Invalid) {}
|
|
249
|
+
/// Sets the iterator to the first arc of the given path
|
|
250
|
+
ArcIt(const PathDumper&) {}
|
|
251
|
+
|
|
252
|
+
/// Conversion to \c Arc
|
|
253
|
+
operator Arc() const { return INVALID; }
|
|
254
|
+
|
|
255
|
+
/// Next arc
|
|
256
|
+
ArcIt& operator++() {return *this;}
|
|
257
|
+
|
|
258
|
+
/// Comparison operator
|
|
259
|
+
bool operator==(const ArcIt&) const {return true;}
|
|
260
|
+
/// Comparison operator
|
|
261
|
+
bool operator!=(const ArcIt&) const {return true;}
|
|
262
|
+
/// Comparison operator
|
|
263
|
+
bool operator<(const ArcIt&) const {return false;}
|
|
264
|
+
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/// \brief LEMON style iterator for enumerating the arcs of a path
|
|
268
|
+
/// in reverse direction.
|
|
269
|
+
///
|
|
270
|
+
/// LEMON style iterator class for enumerating the arcs of a path
|
|
271
|
+
/// in reverse direction.
|
|
272
|
+
class RevArcIt {
|
|
273
|
+
public:
|
|
274
|
+
/// Default constructor
|
|
275
|
+
RevArcIt() {}
|
|
276
|
+
/// Invalid constructor
|
|
277
|
+
RevArcIt(Invalid) {}
|
|
278
|
+
/// Sets the iterator to the last arc of the given path
|
|
279
|
+
RevArcIt(const PathDumper &) {}
|
|
280
|
+
|
|
281
|
+
/// Conversion to \c Arc
|
|
282
|
+
operator Arc() const { return INVALID; }
|
|
283
|
+
|
|
284
|
+
/// Next arc
|
|
285
|
+
RevArcIt& operator++() {return *this;}
|
|
286
|
+
|
|
287
|
+
/// Comparison operator
|
|
288
|
+
bool operator==(const RevArcIt&) const {return true;}
|
|
289
|
+
/// Comparison operator
|
|
290
|
+
bool operator!=(const RevArcIt&) const {return true;}
|
|
291
|
+
/// Comparison operator
|
|
292
|
+
bool operator<(const RevArcIt&) const {return false;}
|
|
293
|
+
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
template <typename _Path>
|
|
297
|
+
struct Constraints {
|
|
298
|
+
void constraints() {
|
|
299
|
+
function_requires<_path_bits::
|
|
300
|
+
PathDumperConstraints<Digraph, _Path> >();
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
///@}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
} // namespace lemon
|
|
311
|
+
|
|
312
|
+
#endif
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#define LEMON_VERSION "@PROJECT_VERSION@"
|
|
2
|
+
#cmakedefine LEMON_HAVE_LONG_LONG 1
|
|
3
|
+
|
|
4
|
+
#cmakedefine LEMON_HAVE_LP 1
|
|
5
|
+
#cmakedefine LEMON_HAVE_MIP 1
|
|
6
|
+
#cmakedefine LEMON_HAVE_GLPK 1
|
|
7
|
+
#cmakedefine LEMON_HAVE_CPLEX 1
|
|
8
|
+
#cmakedefine LEMON_HAVE_SOPLEX 1
|
|
9
|
+
#cmakedefine LEMON_HAVE_CLP 1
|
|
10
|
+
#cmakedefine LEMON_HAVE_CBC 1
|
|
11
|
+
|
|
12
|
+
#define _LEMON_CPLEX 1
|
|
13
|
+
#define _LEMON_CLP 2
|
|
14
|
+
#define _LEMON_GLPK 3
|
|
15
|
+
#define _LEMON_SOPLEX 4
|
|
16
|
+
#define _LEMON_CBC 5
|
|
17
|
+
|
|
18
|
+
#cmakedefine LEMON_DEFAULT_LP _LEMON_@LEMON_DEFAULT_LP@
|
|
19
|
+
#cmakedefine LEMON_DEFAULT_MIP _LEMON_@LEMON_DEFAULT_MIP@
|
|
20
|
+
|
|
21
|
+
#cmakedefine LEMON_USE_PTHREAD 1
|
|
22
|
+
#cmakedefine LEMON_USE_WIN32_THREADS 1
|