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.
Files changed (161) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +8 -0
  3. data/LICENSE +674 -0
  4. data/README.md +6 -0
  5. data/ext/lemon-1.3.1/AUTHORS +26 -0
  6. data/ext/lemon-1.3.1/CMakeLists.txt +371 -0
  7. data/ext/lemon-1.3.1/INSTALL +167 -0
  8. data/ext/lemon-1.3.1/LICENSE +32 -0
  9. data/ext/lemon-1.3.1/NEWS +337 -0
  10. data/ext/lemon-1.3.1/README +50 -0
  11. data/ext/lemon-1.3.1/cmake/FindCOIN.cmake +110 -0
  12. data/ext/lemon-1.3.1/cmake/FindGLPK.cmake +55 -0
  13. data/ext/lemon-1.3.1/cmake/FindGhostscript.cmake +10 -0
  14. data/ext/lemon-1.3.1/cmake/FindILOG.cmake +102 -0
  15. data/ext/lemon-1.3.1/cmake/FindSOPLEX.cmake +23 -0
  16. data/ext/lemon-1.3.1/cmake/LEMONConfig.cmake.in +13 -0
  17. data/ext/lemon-1.3.1/cmake/nsis/lemon.ico +0 -0
  18. data/ext/lemon-1.3.1/cmake/nsis/uninstall.ico +0 -0
  19. data/ext/lemon-1.3.1/cmake/version.cmake +1 -0
  20. data/ext/lemon-1.3.1/cmake/version.cmake.in +1 -0
  21. data/ext/lemon-1.3.1/contrib/CMakeLists.txt +19 -0
  22. data/ext/lemon-1.3.1/lemon/CMakeLists.txt +91 -0
  23. data/ext/lemon-1.3.1/lemon/adaptors.h +3638 -0
  24. data/ext/lemon-1.3.1/lemon/arg_parser.cc +474 -0
  25. data/ext/lemon-1.3.1/lemon/arg_parser.h +440 -0
  26. data/ext/lemon-1.3.1/lemon/assert.h +214 -0
  27. data/ext/lemon-1.3.1/lemon/base.cc +37 -0
  28. data/ext/lemon-1.3.1/lemon/bellman_ford.h +1116 -0
  29. data/ext/lemon-1.3.1/lemon/bfs.h +1754 -0
  30. data/ext/lemon-1.3.1/lemon/bin_heap.h +347 -0
  31. data/ext/lemon-1.3.1/lemon/binomial_heap.h +445 -0
  32. data/ext/lemon-1.3.1/lemon/bits/alteration_notifier.h +472 -0
  33. data/ext/lemon-1.3.1/lemon/bits/array_map.h +351 -0
  34. data/ext/lemon-1.3.1/lemon/bits/bezier.h +174 -0
  35. data/ext/lemon-1.3.1/lemon/bits/default_map.h +182 -0
  36. data/ext/lemon-1.3.1/lemon/bits/edge_set_extender.h +627 -0
  37. data/ext/lemon-1.3.1/lemon/bits/enable_if.h +131 -0
  38. data/ext/lemon-1.3.1/lemon/bits/graph_adaptor_extender.h +401 -0
  39. data/ext/lemon-1.3.1/lemon/bits/graph_extender.h +1332 -0
  40. data/ext/lemon-1.3.1/lemon/bits/lock.h +65 -0
  41. data/ext/lemon-1.3.1/lemon/bits/map_extender.h +332 -0
  42. data/ext/lemon-1.3.1/lemon/bits/path_dump.h +177 -0
  43. data/ext/lemon-1.3.1/lemon/bits/solver_bits.h +194 -0
  44. data/ext/lemon-1.3.1/lemon/bits/traits.h +388 -0
  45. data/ext/lemon-1.3.1/lemon/bits/variant.h +494 -0
  46. data/ext/lemon-1.3.1/lemon/bits/vector_map.h +244 -0
  47. data/ext/lemon-1.3.1/lemon/bits/windows.cc +166 -0
  48. data/ext/lemon-1.3.1/lemon/bits/windows.h +44 -0
  49. data/ext/lemon-1.3.1/lemon/bucket_heap.h +594 -0
  50. data/ext/lemon-1.3.1/lemon/capacity_scaling.h +1014 -0
  51. data/ext/lemon-1.3.1/lemon/cbc.cc +460 -0
  52. data/ext/lemon-1.3.1/lemon/cbc.h +129 -0
  53. data/ext/lemon-1.3.1/lemon/christofides_tsp.h +254 -0
  54. data/ext/lemon-1.3.1/lemon/circulation.h +807 -0
  55. data/ext/lemon-1.3.1/lemon/clp.cc +464 -0
  56. data/ext/lemon-1.3.1/lemon/clp.h +164 -0
  57. data/ext/lemon-1.3.1/lemon/color.cc +44 -0
  58. data/ext/lemon-1.3.1/lemon/color.h +204 -0
  59. data/ext/lemon-1.3.1/lemon/concept_check.h +77 -0
  60. data/ext/lemon-1.3.1/lemon/concepts/bpgraph.h +1029 -0
  61. data/ext/lemon-1.3.1/lemon/concepts/digraph.h +491 -0
  62. data/ext/lemon-1.3.1/lemon/concepts/graph.h +788 -0
  63. data/ext/lemon-1.3.1/lemon/concepts/graph_components.h +2134 -0
  64. data/ext/lemon-1.3.1/lemon/concepts/heap.h +324 -0
  65. data/ext/lemon-1.3.1/lemon/concepts/maps.h +223 -0
  66. data/ext/lemon-1.3.1/lemon/concepts/path.h +312 -0
  67. data/ext/lemon-1.3.1/lemon/config.h.in +22 -0
  68. data/ext/lemon-1.3.1/lemon/connectivity.h +1688 -0
  69. data/ext/lemon-1.3.1/lemon/core.h +2506 -0
  70. data/ext/lemon-1.3.1/lemon/cost_scaling.h +1607 -0
  71. data/ext/lemon-1.3.1/lemon/counter.h +249 -0
  72. data/ext/lemon-1.3.1/lemon/cplex.cc +994 -0
  73. data/ext/lemon-1.3.1/lemon/cplex.h +292 -0
  74. data/ext/lemon-1.3.1/lemon/cycle_canceling.h +1230 -0
  75. data/ext/lemon-1.3.1/lemon/dfs.h +1637 -0
  76. data/ext/lemon-1.3.1/lemon/dheap.h +352 -0
  77. data/ext/lemon-1.3.1/lemon/dijkstra.h +1303 -0
  78. data/ext/lemon-1.3.1/lemon/dim2.h +726 -0
  79. data/ext/lemon-1.3.1/lemon/dimacs.h +448 -0
  80. data/ext/lemon-1.3.1/lemon/edge_set.h +1420 -0
  81. data/ext/lemon-1.3.1/lemon/edmonds_karp.h +556 -0
  82. data/ext/lemon-1.3.1/lemon/elevator.h +982 -0
  83. data/ext/lemon-1.3.1/lemon/error.h +276 -0
  84. data/ext/lemon-1.3.1/lemon/euler.h +287 -0
  85. data/ext/lemon-1.3.1/lemon/fib_heap.h +475 -0
  86. data/ext/lemon-1.3.1/lemon/fractional_matching.h +2139 -0
  87. data/ext/lemon-1.3.1/lemon/full_graph.h +1082 -0
  88. data/ext/lemon-1.3.1/lemon/glpk.cc +1012 -0
  89. data/ext/lemon-1.3.1/lemon/glpk.h +263 -0
  90. data/ext/lemon-1.3.1/lemon/gomory_hu.h +568 -0
  91. data/ext/lemon-1.3.1/lemon/graph_to_eps.h +1186 -0
  92. data/ext/lemon-1.3.1/lemon/greedy_tsp.h +251 -0
  93. data/ext/lemon-1.3.1/lemon/grid_graph.h +699 -0
  94. data/ext/lemon-1.3.1/lemon/grosso_locatelli_pullan_mc.h +840 -0
  95. data/ext/lemon-1.3.1/lemon/hao_orlin.h +1015 -0
  96. data/ext/lemon-1.3.1/lemon/hartmann_orlin_mmc.h +654 -0
  97. data/ext/lemon-1.3.1/lemon/howard_mmc.h +651 -0
  98. data/ext/lemon-1.3.1/lemon/hypercube_graph.h +459 -0
  99. data/ext/lemon-1.3.1/lemon/insertion_tsp.h +533 -0
  100. data/ext/lemon-1.3.1/lemon/karp_mmc.h +590 -0
  101. data/ext/lemon-1.3.1/lemon/kruskal.h +324 -0
  102. data/ext/lemon-1.3.1/lemon/lemon.pc.in +10 -0
  103. data/ext/lemon-1.3.1/lemon/lgf_reader.h +3854 -0
  104. data/ext/lemon-1.3.1/lemon/lgf_writer.h +2687 -0
  105. data/ext/lemon-1.3.1/lemon/list_graph.h +2510 -0
  106. data/ext/lemon-1.3.1/lemon/lp.h +95 -0
  107. data/ext/lemon-1.3.1/lemon/lp_base.cc +30 -0
  108. data/ext/lemon-1.3.1/lemon/lp_base.h +2147 -0
  109. data/ext/lemon-1.3.1/lemon/lp_skeleton.cc +143 -0
  110. data/ext/lemon-1.3.1/lemon/lp_skeleton.h +234 -0
  111. data/ext/lemon-1.3.1/lemon/maps.h +4057 -0
  112. data/ext/lemon-1.3.1/lemon/matching.h +3505 -0
  113. data/ext/lemon-1.3.1/lemon/math.h +77 -0
  114. data/ext/lemon-1.3.1/lemon/max_cardinality_search.h +794 -0
  115. data/ext/lemon-1.3.1/lemon/min_cost_arborescence.h +808 -0
  116. data/ext/lemon-1.3.1/lemon/nagamochi_ibaraki.h +702 -0
  117. data/ext/lemon-1.3.1/lemon/nauty_reader.h +113 -0
  118. data/ext/lemon-1.3.1/lemon/nearest_neighbor_tsp.h +238 -0
  119. data/ext/lemon-1.3.1/lemon/network_simplex.h +1659 -0
  120. data/ext/lemon-1.3.1/lemon/opt2_tsp.h +367 -0
  121. data/ext/lemon-1.3.1/lemon/pairing_heap.h +474 -0
  122. data/ext/lemon-1.3.1/lemon/path.h +1164 -0
  123. data/ext/lemon-1.3.1/lemon/planarity.h +2754 -0
  124. data/ext/lemon-1.3.1/lemon/preflow.h +985 -0
  125. data/ext/lemon-1.3.1/lemon/quad_heap.h +343 -0
  126. data/ext/lemon-1.3.1/lemon/radix_heap.h +438 -0
  127. data/ext/lemon-1.3.1/lemon/radix_sort.h +487 -0
  128. data/ext/lemon-1.3.1/lemon/random.cc +29 -0
  129. data/ext/lemon-1.3.1/lemon/random.h +1005 -0
  130. data/ext/lemon-1.3.1/lemon/smart_graph.h +1344 -0
  131. data/ext/lemon-1.3.1/lemon/soplex.cc +465 -0
  132. data/ext/lemon-1.3.1/lemon/soplex.h +158 -0
  133. data/ext/lemon-1.3.1/lemon/static_graph.h +476 -0
  134. data/ext/lemon-1.3.1/lemon/suurballe.h +776 -0
  135. data/ext/lemon-1.3.1/lemon/time_measure.h +610 -0
  136. data/ext/lemon-1.3.1/lemon/tolerance.h +242 -0
  137. data/ext/lemon-1.3.1/lemon/unionfind.h +1824 -0
  138. data/ext/lemon-1.3.1/scripts/unify-sources.sh +390 -0
  139. data/ext/lemon-1.3.1/scripts/valgrind-wrapper.sh +22 -0
  140. data/ext/lemongraph/arc_map.cc +1007 -0
  141. data/ext/lemongraph/digraph.cc +282 -0
  142. data/ext/lemongraph/digraph_arc.cc +153 -0
  143. data/ext/lemongraph/digraph_node.cc +277 -0
  144. data/ext/lemongraph/edge_map.cc +770 -0
  145. data/ext/lemongraph/extconf.rb +53 -0
  146. data/ext/lemongraph/graph.cc +351 -0
  147. data/ext/lemongraph/graph_arc.cc +95 -0
  148. data/ext/lemongraph/graph_edge.cc +153 -0
  149. data/ext/lemongraph/graph_item.cc +76 -0
  150. data/ext/lemongraph/graph_node.cc +321 -0
  151. data/ext/lemongraph/lemongraph.cc +260 -0
  152. data/ext/lemongraph/lemongraph.hh +295 -0
  153. data/ext/lemongraph/lemongraph.map +6 -0
  154. data/ext/lemongraph/lemongraph_export.hh +31 -0
  155. data/ext/lemongraph/node_map.cc +1011 -0
  156. data/lemongraph.gemspec +176 -0
  157. data/lib/lemongraph/graphviz.rb +240 -0
  158. data/lib/lemongraph/version.rb +4 -0
  159. data/lib/lemongraph.rb +21 -0
  160. data/samples/lemondeps.rb +38 -0
  161. metadata +202 -0
@@ -0,0 +1,324 @@
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
+ #ifndef LEMON_KRUSKAL_H
20
+ #define LEMON_KRUSKAL_H
21
+
22
+ #include <algorithm>
23
+ #include <vector>
24
+ #include <lemon/unionfind.h>
25
+ #include <lemon/maps.h>
26
+
27
+ #include <lemon/core.h>
28
+ #include <lemon/bits/traits.h>
29
+
30
+ ///\ingroup spantree
31
+ ///\file
32
+ ///\brief Kruskal's algorithm to compute a minimum cost spanning tree
33
+
34
+ namespace lemon {
35
+
36
+ namespace _kruskal_bits {
37
+
38
+ // Kruskal for directed graphs.
39
+
40
+ template <typename Digraph, typename In, typename Out>
41
+ typename disable_if<lemon::UndirectedTagIndicator<Digraph>,
42
+ typename In::value_type::second_type >::type
43
+ kruskal(const Digraph& digraph, const In& in, Out& out,dummy<0> = 0) {
44
+ typedef typename In::value_type::second_type Value;
45
+ typedef typename Digraph::template NodeMap<int> IndexMap;
46
+ typedef typename Digraph::Node Node;
47
+
48
+ IndexMap index(digraph);
49
+ UnionFind<IndexMap> uf(index);
50
+ for (typename Digraph::NodeIt it(digraph); it != INVALID; ++it) {
51
+ uf.insert(it);
52
+ }
53
+
54
+ Value tree_value = 0;
55
+ for (typename In::const_iterator it = in.begin(); it != in.end(); ++it) {
56
+ if (uf.join(digraph.target(it->first),digraph.source(it->first))) {
57
+ out.set(it->first, true);
58
+ tree_value += it->second;
59
+ }
60
+ else {
61
+ out.set(it->first, false);
62
+ }
63
+ }
64
+ return tree_value;
65
+ }
66
+
67
+ // Kruskal for undirected graphs.
68
+
69
+ template <typename Graph, typename In, typename Out>
70
+ typename enable_if<lemon::UndirectedTagIndicator<Graph>,
71
+ typename In::value_type::second_type >::type
72
+ kruskal(const Graph& graph, const In& in, Out& out,dummy<1> = 1) {
73
+ typedef typename In::value_type::second_type Value;
74
+ typedef typename Graph::template NodeMap<int> IndexMap;
75
+ typedef typename Graph::Node Node;
76
+
77
+ IndexMap index(graph);
78
+ UnionFind<IndexMap> uf(index);
79
+ for (typename Graph::NodeIt it(graph); it != INVALID; ++it) {
80
+ uf.insert(it);
81
+ }
82
+
83
+ Value tree_value = 0;
84
+ for (typename In::const_iterator it = in.begin(); it != in.end(); ++it) {
85
+ if (uf.join(graph.u(it->first),graph.v(it->first))) {
86
+ out.set(it->first, true);
87
+ tree_value += it->second;
88
+ }
89
+ else {
90
+ out.set(it->first, false);
91
+ }
92
+ }
93
+ return tree_value;
94
+ }
95
+
96
+
97
+ template <typename Sequence>
98
+ struct PairComp {
99
+ typedef typename Sequence::value_type Value;
100
+ bool operator()(const Value& left, const Value& right) {
101
+ return left.second < right.second;
102
+ }
103
+ };
104
+
105
+ template <typename In, typename Enable = void>
106
+ struct SequenceInputIndicator {
107
+ static const bool value = false;
108
+ };
109
+
110
+ template <typename In>
111
+ struct SequenceInputIndicator<In,
112
+ typename exists<typename In::value_type::first_type>::type> {
113
+ static const bool value = true;
114
+ };
115
+
116
+ template <typename In, typename Enable = void>
117
+ struct MapInputIndicator {
118
+ static const bool value = false;
119
+ };
120
+
121
+ template <typename In>
122
+ struct MapInputIndicator<In,
123
+ typename exists<typename In::Value>::type> {
124
+ static const bool value = true;
125
+ };
126
+
127
+ template <typename In, typename Enable = void>
128
+ struct SequenceOutputIndicator {
129
+ static const bool value = false;
130
+ };
131
+
132
+ template <typename Out>
133
+ struct SequenceOutputIndicator<Out,
134
+ typename exists<typename Out::value_type>::type> {
135
+ static const bool value = true;
136
+ };
137
+
138
+ template <typename Out, typename Enable = void>
139
+ struct MapOutputIndicator {
140
+ static const bool value = false;
141
+ };
142
+
143
+ template <typename Out>
144
+ struct MapOutputIndicator<Out,
145
+ typename exists<typename Out::Value>::type> {
146
+ static const bool value = true;
147
+ };
148
+
149
+ template <typename In, typename InEnable = void>
150
+ struct KruskalValueSelector {};
151
+
152
+ template <typename In>
153
+ struct KruskalValueSelector<In,
154
+ typename enable_if<SequenceInputIndicator<In>, void>::type>
155
+ {
156
+ typedef typename In::value_type::second_type Value;
157
+ };
158
+
159
+ template <typename In>
160
+ struct KruskalValueSelector<In,
161
+ typename enable_if<MapInputIndicator<In>, void>::type>
162
+ {
163
+ typedef typename In::Value Value;
164
+ };
165
+
166
+ template <typename Graph, typename In, typename Out,
167
+ typename InEnable = void>
168
+ struct KruskalInputSelector {};
169
+
170
+ template <typename Graph, typename In, typename Out,
171
+ typename InEnable = void>
172
+ struct KruskalOutputSelector {};
173
+
174
+ template <typename Graph, typename In, typename Out>
175
+ struct KruskalInputSelector<Graph, In, Out,
176
+ typename enable_if<SequenceInputIndicator<In>, void>::type >
177
+ {
178
+ typedef typename In::value_type::second_type Value;
179
+
180
+ static Value kruskal(const Graph& graph, const In& in, Out& out) {
181
+ return KruskalOutputSelector<Graph, In, Out>::
182
+ kruskal(graph, in, out);
183
+ }
184
+
185
+ };
186
+
187
+ template <typename Graph, typename In, typename Out>
188
+ struct KruskalInputSelector<Graph, In, Out,
189
+ typename enable_if<MapInputIndicator<In>, void>::type >
190
+ {
191
+ typedef typename In::Value Value;
192
+ static Value kruskal(const Graph& graph, const In& in, Out& out) {
193
+ typedef typename In::Key MapArc;
194
+ typedef typename In::Value Value;
195
+ typedef typename ItemSetTraits<Graph, MapArc>::ItemIt MapArcIt;
196
+ typedef std::vector<std::pair<MapArc, Value> > Sequence;
197
+ Sequence seq;
198
+
199
+ for (MapArcIt it(graph); it != INVALID; ++it) {
200
+ seq.push_back(std::make_pair(it, in[it]));
201
+ }
202
+
203
+ std::sort(seq.begin(), seq.end(), PairComp<Sequence>());
204
+ return KruskalOutputSelector<Graph, Sequence, Out>::
205
+ kruskal(graph, seq, out);
206
+ }
207
+ };
208
+
209
+ template <typename T>
210
+ struct RemoveConst {
211
+ typedef T type;
212
+ };
213
+
214
+ template <typename T>
215
+ struct RemoveConst<const T> {
216
+ typedef T type;
217
+ };
218
+
219
+ template <typename Graph, typename In, typename Out>
220
+ struct KruskalOutputSelector<Graph, In, Out,
221
+ typename enable_if<SequenceOutputIndicator<Out>, void>::type >
222
+ {
223
+ typedef typename In::value_type::second_type Value;
224
+
225
+ static Value kruskal(const Graph& graph, const In& in, Out& out) {
226
+ typedef LoggerBoolMap<typename RemoveConst<Out>::type> Map;
227
+ Map map(out);
228
+ return _kruskal_bits::kruskal(graph, in, map);
229
+ }
230
+
231
+ };
232
+
233
+ template <typename Graph, typename In, typename Out>
234
+ struct KruskalOutputSelector<Graph, In, Out,
235
+ typename enable_if<MapOutputIndicator<Out>, void>::type >
236
+ {
237
+ typedef typename In::value_type::second_type Value;
238
+
239
+ static Value kruskal(const Graph& graph, const In& in, Out& out) {
240
+ return _kruskal_bits::kruskal(graph, in, out);
241
+ }
242
+ };
243
+
244
+ }
245
+
246
+ /// \ingroup spantree
247
+ ///
248
+ /// \brief Kruskal's algorithm for finding a minimum cost spanning tree of
249
+ /// a graph.
250
+ ///
251
+ /// This function runs Kruskal's algorithm to find a minimum cost
252
+ /// spanning tree of a graph.
253
+ /// Due to some C++ hacking, it accepts various input and output types.
254
+ ///
255
+ /// \param g The graph the algorithm runs on.
256
+ /// It can be either \ref concepts::Digraph "directed" or
257
+ /// \ref concepts::Graph "undirected".
258
+ /// If the graph is directed, the algorithm consider it to be
259
+ /// undirected by disregarding the direction of the arcs.
260
+ ///
261
+ /// \param in This object is used to describe the arc/edge costs.
262
+ /// It can be one of the following choices.
263
+ /// - An STL compatible 'Forward Container' with
264
+ /// <tt>std::pair<GR::Arc,C></tt> or
265
+ /// <tt>std::pair<GR::Edge,C></tt> as its <tt>value_type</tt>, where
266
+ /// \c C is the type of the costs. The pairs indicates the arcs/edges
267
+ /// along with the assigned cost. <em>They must be in a
268
+ /// cost-ascending order.</em>
269
+ /// - Any readable arc/edge map. The values of the map indicate the
270
+ /// arc/edge costs.
271
+ ///
272
+ /// \retval out Here we also have a choice.
273
+ /// - It can be a writable arc/edge map with \c bool value type. After
274
+ /// running the algorithm it will contain the found minimum cost spanning
275
+ /// tree: the value of an arc/edge will be set to \c true if it belongs
276
+ /// to the tree, otherwise it will be set to \c false. The value of
277
+ /// each arc/edge will be set exactly once.
278
+ /// - It can also be an iteraror of an STL Container with
279
+ /// <tt>GR::Arc</tt> or <tt>GR::Edge</tt> as its
280
+ /// <tt>value_type</tt>. The algorithm copies the elements of the
281
+ /// found tree into this sequence. For example, if we know that the
282
+ /// spanning tree of the graph \c g has say 53 arcs, then we can
283
+ /// put its arcs into an STL vector \c tree with a code like this.
284
+ ///\code
285
+ /// std::vector<Arc> tree(53);
286
+ /// kruskal(g,cost,tree.begin());
287
+ ///\endcode
288
+ /// Or if we don't know in advance the size of the tree, we can
289
+ /// write this.
290
+ ///\code
291
+ /// std::vector<Arc> tree;
292
+ /// kruskal(g,cost,std::back_inserter(tree));
293
+ ///\endcode
294
+ ///
295
+ /// \return The total cost of the found spanning tree.
296
+ ///
297
+ /// \note If the input graph is not (weakly) connected, a spanning
298
+ /// forest is calculated instead of a spanning tree.
299
+
300
+ #ifdef DOXYGEN
301
+ template <typename Graph, typename In, typename Out>
302
+ Value kruskal(const Graph& g, const In& in, Out& out)
303
+ #else
304
+ template <class Graph, class In, class Out>
305
+ inline typename _kruskal_bits::KruskalValueSelector<In>::Value
306
+ kruskal(const Graph& graph, const In& in, Out& out)
307
+ #endif
308
+ {
309
+ return _kruskal_bits::KruskalInputSelector<Graph, In, Out>::
310
+ kruskal(graph, in, out);
311
+ }
312
+
313
+
314
+ template <class Graph, class In, class Out>
315
+ inline typename _kruskal_bits::KruskalValueSelector<In>::Value
316
+ kruskal(const Graph& graph, const In& in, const Out& out)
317
+ {
318
+ return _kruskal_bits::KruskalInputSelector<Graph, In, const Out>::
319
+ kruskal(graph, in, out);
320
+ }
321
+
322
+ } //namespace lemon
323
+
324
+ #endif //LEMON_KRUSKAL_H
@@ -0,0 +1,10 @@
1
+ prefix=@CMAKE_INSTALL_PREFIX@
2
+ exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
3
+ libdir=@CMAKE_INSTALL_PREFIX@/lib
4
+ includedir=@CMAKE_INSTALL_PREFIX@/include
5
+
6
+ Name: @PROJECT_NAME@
7
+ Description: Library for Efficient Modeling and Optimization in Networks
8
+ Version: @PROJECT_VERSION@
9
+ Libs: -L${libdir} -lemon @GLPK_LIBS@ @CPLEX_LIBS@ @SOPLEX_LIBS@ @CLP_LIBS@ @CBC_LIBS@
10
+ Cflags: -I${includedir}