[Lemon-commits] [lemon_svn] deba: r2547 - hugo/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:53:29 CET 2006
Author: deba
Date: Tue Feb 14 11:41:16 2006
New Revision: 2547
Added:
hugo/trunk/lemon/minimum_cut.h
- copied, changed from r2546, /hugo/trunk/lemon/minimal_cut.h
Removed:
hugo/trunk/lemon/minimal_cut.h
Modified:
hugo/trunk/lemon/Makefile.am
Log:
Name modification
Modified: hugo/trunk/lemon/Makefile.am
==============================================================================
--- hugo/trunk/lemon/Makefile.am (original)
+++ hugo/trunk/lemon/Makefile.am Tue Feb 14 11:41:16 2006
@@ -58,7 +58,7 @@
map_iterator.h \
max_matching.h \
min_cost_flow.h \
- minimal_cut.h \
+ minimum_cut.h \
suurballe.h \
preflow.h \
path.h \
Copied: hugo/trunk/lemon/minimum_cut.h (from r2546, /hugo/trunk/lemon/minimal_cut.h)
==============================================================================
--- /hugo/trunk/lemon/minimal_cut.h (original)
+++ hugo/trunk/lemon/minimum_cut.h Tue Feb 14 11:41:16 2006
@@ -1,5 +1,5 @@
/* -*- C++ -*-
- * lemon/minimal_cut.h - Part of LEMON, a generic C++ optimization library
+ * lemon/minimum_cut.h - Part of LEMON, a generic C++ optimization library
*
* Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -14,13 +14,13 @@
*
*/
-#ifndef LEMON_MINIMAL_CUT_H
-#define LEMON_MINIMAL_CUT_H
+#ifndef LEMON_MINIMUM_CUT_H
+#define LEMON_MINIMUM_CUT_H
/// \ingroup topology
/// \file
-/// \brief Maximum cardinality search and minimal cut in undirected graphs.
+/// \brief Maximum cardinality search and minimum cut in undirected graphs.
#include <lemon/list_graph.h>
#include <lemon/bin_heap.h>
@@ -34,7 +34,7 @@
namespace lemon {
- namespace _minimal_cut_bits {
+ namespace _minimum_cut_bits {
template <typename CapacityMap>
struct HeapSelector {
@@ -97,7 +97,7 @@
/// to LinearHeap.
///
/// \sa MaxCardinalitySearch
- typedef typename _minimal_cut_bits
+ typedef typename _minimum_cut_bits
::HeapSelector<CapacityMap>
::template Selector<typename Graph::Node, Value, HeapCrossRef>
::Heap Heap;
@@ -688,13 +688,13 @@
///@}
};
- /// \brief Default traits class of MinimalCut class.
+ /// \brief Default traits class of MinimumCut class.
///
- /// Default traits class of MinimalCut class.
+ /// Default traits class of MinimumCut class.
/// \param Graph Graph type.
/// \param CapacityMap Type of length map.
template <typename _Graph, typename _CapacityMap>
- struct MinimalCutDefaultTraits {
+ struct MinimumCutDefaultTraits {
/// \brief The type of the capacity of the edges.
typedef typename _CapacityMap::Value Value;
@@ -756,15 +756,15 @@
return new HeapCrossRef(graph);
}
- /// \brief The heap type used by MinimalCut algorithm.
+ /// \brief The heap type used by MinimumCut algorithm.
///
- /// The heap type used by MinimalCut algorithm. It should
+ /// The heap type used by MinimumCut algorithm. It should
/// maximalize the priorities and the heap's key type is
/// the work graph's node.
///
/// \sa BinHeap
- /// \sa MinimalCut
- typedef typename _minimal_cut_bits
+ /// \sa MinimumCut
+ typedef typename _minimum_cut_bits
::HeapSelector<CapacityMap>
::template Selector<typename WorkGraph::Node, Value, HeapCrossRef>
::Heap Heap;
@@ -806,7 +806,7 @@
};
- namespace _minimal_cut_bits {
+ namespace _minimum_cut_bits {
template <typename _Key>
class LastTwoMap {
public:
@@ -830,11 +830,11 @@
/// \ingroup topology
///
- /// \brief Calculates the minimal cut in an undirected graph.
+ /// \brief Calculates the minimum cut in an undirected graph.
///
- /// Calculates the minimal cut in an undirected graph.
+ /// Calculates the minimum cut in an undirected graph.
/// The algorithm separates the graph's nodes to two partitions with the
- /// minimal sum of edge capacities between the two partitions. The
+ /// minimum sum of edge capacities between the two partitions. The
/// algorithm can be used to test the network reliability specifically
/// to test how many links have to be destroyed in the network to split it
/// at least two distinict subnetwork.
@@ -847,9 +847,9 @@
#else
template <typename _Graph = ListUGraph,
typename _CapacityMap = typename _Graph::template UEdgeMap<int>,
- typename _Traits = MinimalCutDefaultTraits<_Graph, _CapacityMap> >
+ typename _Traits = MinimumCutDefaultTraits<_Graph, _CapacityMap> >
#endif
- class MinimalCut {
+ class MinimumCut {
public:
/// \brief \ref Exception for uninitialized parameters.
///
@@ -858,7 +858,7 @@
class UninitializedParameter : public lemon::UninitializedParameter {
public:
virtual const char* exceptionName() const {
- return "lemon::MinimalCut::UninitializedParameter";
+ return "lemon::MinimumCut::UninitializedParameter";
}
};
@@ -904,8 +904,8 @@
/// \ref named-templ-param "Named parameter" for setting
/// the capacity type to constMap<UEdge, int, 1>()
struct DefNeutralCapacity
- : public MinimalCut<Graph, CapacityMap, DefNeutralCapacityTraits> {
- typedef MinimalCut<Graph, CapacityMap, DefNeutralCapacityTraits> Create;
+ : public MinimumCut<Graph, CapacityMap, DefNeutralCapacityTraits> {
+ typedef MinimumCut<Graph, CapacityMap, DefNeutralCapacityTraits> Create;
};
@@ -927,8 +927,8 @@
/// reference type
template <class H, class CR = typename Graph::template NodeMap<int> >
struct DefHeap
- : public MinimalCut<Graph, CapacityMap, DefHeapTraits<H, CR> > {
- typedef MinimalCut< Graph, CapacityMap, DefHeapTraits<H, CR> > Create;
+ : public MinimumCut<Graph, CapacityMap, DefHeapTraits<H, CR> > {
+ typedef MinimumCut< Graph, CapacityMap, DefHeapTraits<H, CR> > Create;
};
template <class H, class CR>
@@ -952,8 +952,8 @@
/// parameter and the heap's constructor waits for the cross reference.
template <class H, class CR = typename Graph::template NodeMap<int> >
struct DefStandardHeap
- : public MinimalCut<Graph, CapacityMap, DefStandardHeapTraits<H, CR> > {
- typedef MinimalCut<Graph, CapacityMap, DefStandardHeapTraits<H, CR> >
+ : public MinimumCut<Graph, CapacityMap, DefStandardHeapTraits<H, CR> > {
+ typedef MinimumCut<Graph, CapacityMap, DefStandardHeapTraits<H, CR> >
Create;
};
@@ -989,8 +989,8 @@
/// Indicates if \ref _heap is locally allocated (\c true) or not.
bool local_heap;
- /// The minimal cut value.
- Value _minimal_cut;
+ /// The minimum cut value.
+ Value _minimum_cut;
/// The number of the nodes of the work graph.
int _node_num;
/// The first and last node of the min cut in the next list;
@@ -1052,14 +1052,14 @@
public :
- typedef MinimalCut Create;
+ typedef MinimumCut Create;
/// \brief Constructor.
///
///\param graph the graph the algorithm will run on.
///\param capacity the capacity map used by the algorithm.
- MinimalCut(const Graph& graph, const CapacityMap& capacity)
+ MinimumCut(const Graph& graph, const CapacityMap& capacity)
: _graph(&graph),
_capacity(&capacity), local_capacity(false),
_work_graph(0), local_work_graph(false),
@@ -1076,7 +1076,7 @@
/// construct the capacity map.
///
///\param graph the graph the algorithm will run on.
- MinimalCut(const Graph& graph)
+ MinimumCut(const Graph& graph)
: _graph(&graph),
_capacity(0), local_capacity(false),
_work_graph(0), local_work_graph(false),
@@ -1088,7 +1088,7 @@
/// \brief Destructor.
///
/// Destructor.
- ~MinimalCut() {
+ ~MinimumCut() {
if (local_heap) delete _heap;
if (local_heap_cross_ref) delete _heap_cross_ref;
if (_first) delete _first;
@@ -1106,7 +1106,7 @@
/// it will allocate one. The destuctor deallocates this
/// automatically allocated heap and cross reference, of course.
/// \return <tt> (*this) </tt>
- MinimalCut &heap(Heap& heap, HeapCrossRef &crossRef)
+ MinimumCut &heap(Heap& heap, HeapCrossRef &crossRef)
{
if (local_heap_cross_ref) {
delete _heap_cross_ref;
@@ -1128,7 +1128,7 @@
/// it will allocate one. The destuctor deallocates this
/// automatically allocated graph, of course.
/// \return <tt> (*this) </tt>
- MinimalCut &workGraph(WorkGraph& work_graph)
+ MinimumCut &workGraph(WorkGraph& work_graph)
{
if(local_work_graph) {
delete _work_graph;
@@ -1145,7 +1145,7 @@
/// it will allocate one. The destuctor deallocates this
/// automatically allocated graph, of course.
/// \return <tt> (*this) </tt>
- MinimalCut &workCapacityMap(WorkCapacityMap& work_capacity_map)
+ MinimumCut &workCapacityMap(WorkCapacityMap& work_capacity_map)
{
if(local_work_capacity) {
delete _work_capacity;
@@ -1178,12 +1178,12 @@
///
/// Processes the next phase in the algorithm. The function
/// should be called countNodes(graph) - 1 times to get
- /// surely the minimal cut in the graph. The
+ /// surely the minimum cut in the graph. The
///
///\return %True when the algorithm finished.
bool processNextPhase() {
if (_node_num <= 1) return true;
- using namespace _minimal_cut_bits;
+ using namespace _minimum_cut_bits;
typedef typename WorkGraph::Node Node;
typedef typename WorkGraph::NodeIt NodeIt;
@@ -1234,10 +1234,10 @@
}
}
- if (_first_node == INVALID || current_cut < _minimal_cut) {
+ if (_first_node == INVALID || current_cut < _minimum_cut) {
_first_node = (*_first)[first_node];
_last_node = (*_last)[first_node];
- _minimal_cut = current_cut;
+ _minimum_cut = current_cut;
}
_work_graph->erase(first_node);
@@ -1267,9 +1267,9 @@
}
- /// \brief Runs %MinimalCut algorithm.
+ /// \brief Runs %MinimumCut algorithm.
///
- /// This method runs the %Minimal cut algorithm
+ /// This method runs the %Minimum cut algorithm
///
/// \note mc.run(s) is just a shortcut of the following code.
///\code
@@ -1284,23 +1284,23 @@
///@}
/// \name Query Functions
- /// The result of the %MinimalCut algorithm can be obtained using these
+ /// The result of the %MinimumCut algorithm can be obtained using these
/// functions.\n
/// Before the use of these functions,
/// either run() or start() must be called.
///@{
- /// \brief Returns the minimal cut value.
+ /// \brief Returns the minimum cut value.
///
- /// Returns the minimal cut value if the algorithm finished.
+ /// Returns the minimum cut value if the algorithm finished.
/// After the first processNextPhase() it is a value of a
/// valid cut in the graph.
Value minCut() const {
- return _minimal_cut;
+ return _minimum_cut;
}
- /// \brief Returns a minimal cut in a NodeMap.
+ /// \brief Returns a minimum cut in a NodeMap.
///
/// It sets the nodes of one of the two partitions to true in
/// the given BoolNodeMap. The map contains a valid cut if the
@@ -1315,7 +1315,7 @@
return minCut();
}
- /// \brief Returns a minimal cut in a NodeMap.
+ /// \brief Returns a minimum cut in a NodeMap.
///
/// It sets the nodes of one of the two partitions to true and
/// the other partition to false. The function first set all of the
@@ -1329,7 +1329,7 @@
return minCut();
}
- /// \brief Returns a minimal cut in an EdgeMap.
+ /// \brief Returns a minimum cut in an EdgeMap.
///
/// If an undirected edge is cut edge then it will be
/// setted to true and the others will be setted to false in the given map.
More information about the Lemon-commits
mailing list