0
5
0
... | ... |
@@ -77,25 +77,26 @@ |
77 | 77 |
/// |
78 | 78 |
/// \tparam GR The digraph type the algorithm runs on. |
79 | 79 |
/// \tparam V The number type used for flow amounts, capacity bounds |
80 | 80 |
/// and supply values in the algorithm. By default, it is \c int. |
81 | 81 |
/// \tparam C The number type used for costs and potentials in the |
82 | 82 |
/// algorithm. By default, it is the same as \c V. |
83 | 83 |
/// \tparam TR The traits class that defines various types used by the |
84 | 84 |
/// algorithm. By default, it is \ref CapacityScalingDefaultTraits |
85 | 85 |
/// "CapacityScalingDefaultTraits<GR, V, C>". |
86 | 86 |
/// In most cases, this parameter should not be set directly, |
87 | 87 |
/// consider to use the named template parameters instead. |
88 | 88 |
/// |
89 |
/// \warning Both |
|
89 |
/// \warning Both \c V and \c C must be signed number types. |
|
90 |
/// \warning All input data (capacities, supply values, and costs) must |
|
90 | 91 |
/// be integer. |
91 | 92 |
/// \warning This algorithm does not support negative costs for such |
92 | 93 |
/// arcs that have infinite upper bound. |
93 | 94 |
#ifdef DOXYGEN |
94 | 95 |
template <typename GR, typename V, typename C, typename TR> |
95 | 96 |
#else |
96 | 97 |
template < typename GR, typename V = int, typename C = V, |
97 | 98 |
typename TR = CapacityScalingDefaultTraits<GR, V, C> > |
98 | 99 |
#endif |
99 | 100 |
class CapacityScaling |
100 | 101 |
{ |
101 | 102 |
public: |
... | ... |
@@ -104,25 +104,26 @@ |
104 | 104 |
/// |
105 | 105 |
/// \tparam GR The digraph type the algorithm runs on. |
106 | 106 |
/// \tparam V The number type used for flow amounts, capacity bounds |
107 | 107 |
/// and supply values in the algorithm. By default, it is \c int. |
108 | 108 |
/// \tparam C The number type used for costs and potentials in the |
109 | 109 |
/// algorithm. By default, it is the same as \c V. |
110 | 110 |
/// \tparam TR The traits class that defines various types used by the |
111 | 111 |
/// algorithm. By default, it is \ref CostScalingDefaultTraits |
112 | 112 |
/// "CostScalingDefaultTraits<GR, V, C>". |
113 | 113 |
/// In most cases, this parameter should not be set directly, |
114 | 114 |
/// consider to use the named template parameters instead. |
115 | 115 |
/// |
116 |
/// \warning Both |
|
116 |
/// \warning Both \c V and \c C must be signed number types. |
|
117 |
/// \warning All input data (capacities, supply values, and costs) must |
|
117 | 118 |
/// be integer. |
118 | 119 |
/// \warning This algorithm does not support negative costs for such |
119 | 120 |
/// arcs that have infinite upper bound. |
120 | 121 |
/// |
121 | 122 |
/// \note %CostScaling provides three different internal methods, |
122 | 123 |
/// from which the most efficient one is used by default. |
123 | 124 |
/// For more information, see \ref Method. |
124 | 125 |
#ifdef DOXYGEN |
125 | 126 |
template <typename GR, typename V, typename C, typename TR> |
126 | 127 |
#else |
127 | 128 |
template < typename GR, typename V = int, typename C = V, |
128 | 129 |
typename TR = CostScalingDefaultTraits<GR, V, C> > |
... | ... |
@@ -56,25 +56,26 @@ |
56 | 56 |
/// |
57 | 57 |
/// Most of the parameters of the problem (except for the digraph) |
58 | 58 |
/// can be given using separate functions, and the algorithm can be |
59 | 59 |
/// executed using the \ref run() function. If some parameters are not |
60 | 60 |
/// specified, then default values will be used. |
61 | 61 |
/// |
62 | 62 |
/// \tparam GR The digraph type the algorithm runs on. |
63 | 63 |
/// \tparam V The number type used for flow amounts, capacity bounds |
64 | 64 |
/// and supply values in the algorithm. By default, it is \c int. |
65 | 65 |
/// \tparam C The number type used for costs and potentials in the |
66 | 66 |
/// algorithm. By default, it is the same as \c V. |
67 | 67 |
/// |
68 |
/// \warning Both |
|
68 |
/// \warning Both \c V and \c C must be signed number types. |
|
69 |
/// \warning All input data (capacities, supply values, and costs) must |
|
69 | 70 |
/// be integer. |
70 | 71 |
/// \warning This algorithm does not support negative costs for such |
71 | 72 |
/// arcs that have infinite upper bound. |
72 | 73 |
/// |
73 | 74 |
/// \note For more information about the three available methods, |
74 | 75 |
/// see \ref Method. |
75 | 76 |
#ifdef DOXYGEN |
76 | 77 |
template <typename GR, typename V, typename C> |
77 | 78 |
#else |
78 | 79 |
template <typename GR, typename V = int, typename C = V> |
79 | 80 |
#endif |
80 | 81 |
class CycleCanceling |
... | ... |
@@ -21,27 +21,24 @@ |
21 | 21 |
|
22 | 22 |
#include <algorithm> |
23 | 23 |
#include <vector> |
24 | 24 |
#include <lemon/unionfind.h> |
25 | 25 |
#include <lemon/maps.h> |
26 | 26 |
|
27 | 27 |
#include <lemon/core.h> |
28 | 28 |
#include <lemon/bits/traits.h> |
29 | 29 |
|
30 | 30 |
///\ingroup spantree |
31 | 31 |
///\file |
32 | 32 |
///\brief Kruskal's algorithm to compute a minimum cost spanning tree |
33 |
/// |
|
34 |
///Kruskal's algorithm to compute a minimum cost spanning tree. |
|
35 |
/// |
|
36 | 33 |
|
37 | 34 |
namespace lemon { |
38 | 35 |
|
39 | 36 |
namespace _kruskal_bits { |
40 | 37 |
|
41 | 38 |
// Kruskal for directed graphs. |
42 | 39 |
|
43 | 40 |
template <typename Digraph, typename In, typename Out> |
44 | 41 |
typename disable_if<lemon::UndirectedTagIndicator<Digraph>, |
45 | 42 |
typename In::value_type::second_type >::type |
46 | 43 |
kruskal(const Digraph& digraph, const In& in, Out& out,dummy<0> = 0) { |
47 | 44 |
typedef typename In::value_type::second_type Value; |
... | ... |
@@ -54,25 +54,26 @@ |
54 | 54 |
/// |
55 | 55 |
/// Most of the parameters of the problem (except for the digraph) |
56 | 56 |
/// can be given using separate functions, and the algorithm can be |
57 | 57 |
/// executed using the \ref run() function. If some parameters are not |
58 | 58 |
/// specified, then default values will be used. |
59 | 59 |
/// |
60 | 60 |
/// \tparam GR The digraph type the algorithm runs on. |
61 | 61 |
/// \tparam V The number type used for flow amounts, capacity bounds |
62 | 62 |
/// and supply values in the algorithm. By default, it is \c int. |
63 | 63 |
/// \tparam C The number type used for costs and potentials in the |
64 | 64 |
/// algorithm. By default, it is the same as \c V. |
65 | 65 |
/// |
66 |
/// \warning Both |
|
66 |
/// \warning Both \c V and \c C must be signed number types. |
|
67 |
/// \warning All input data (capacities, supply values, and costs) must |
|
67 | 68 |
/// be integer. |
68 | 69 |
/// |
69 | 70 |
/// \note %NetworkSimplex provides five different pivot rule |
70 | 71 |
/// implementations, from which the most efficient one is used |
71 | 72 |
/// by default. For more information, see \ref PivotRule. |
72 | 73 |
template <typename GR, typename V = int, typename C = V> |
73 | 74 |
class NetworkSimplex |
74 | 75 |
{ |
75 | 76 |
public: |
76 | 77 |
|
77 | 78 |
/// The type of the flow amounts, capacity bounds and supply values |
78 | 79 |
typedef V Value; |
0 comments (0 inline)