[Lemon-commits] Peter Kovacs: Rename Residual to ResidualDigraph...
Lemon HG
hg at lemon.cs.elte.hu
Mon Jan 12 14:27:22 CET 2009
details: http://lemon.cs.elte.hu/hg/lemon/rev/acfb0f24d178
changeset: 487:acfb0f24d178
user: Peter Kovacs <kpeter [at] inf.elte.hu>
date: Mon Jan 12 08:05:30 2009 +0100
description:
Rename Residual to ResidualDigraph (#67) The new name is more
analogous to other adaptor names.
diffstat:
2 files changed, 17 insertions(+), 18 deletions(-)
lemon/adaptors.h | 25 ++++++++++++-------------
test/graph_adaptor_test.cc | 10 +++++-----
diffs (100 lines):
diff --git a/lemon/adaptors.h b/lemon/adaptors.h
--- a/lemon/adaptors.h
+++ b/lemon/adaptors.h
@@ -2666,10 +2666,10 @@
/// \brief Adaptor class for composing the residual digraph for directed
/// flow and circulation problems.
///
- /// Residual can be used for composing the \e residual digraph for directed
- /// flow and circulation problems. Let \f$ G=(V, A) \f$ be a directed graph
- /// and let \f$ F \f$ be a number type. Let \f$ flow, cap: A\to F \f$ be
- /// functions on the arcs.
+ /// ResidualDigraph can be used for composing the \e residual digraph
+ /// for directed flow and circulation problems. Let \f$ G=(V, A) \f$
+ /// be a directed graph and let \f$ F \f$ be a number type.
+ /// Let \f$ flow, cap: A\to F \f$ be functions on the arcs.
/// This adaptor implements a digraph structure with node set \f$ V \f$
/// and arc set \f$ A_{forward}\cup A_{backward} \f$,
/// where \f$ A_{forward}=\{uv : uv\in A, flow(uv)<cap(uv)\} \f$ and
@@ -2704,13 +2704,13 @@
/// is convertible to the \c Arc type of the adapted digraph.
#ifdef DOXYGEN
template<typename GR, typename CM, typename FM, typename TL>
- class Residual
+ class ResidualDigraph
#else
template<typename GR,
typename CM = typename GR::template ArcMap<int>,
typename FM = CM,
typename TL = Tolerance<typename CM::Value> >
- class Residual :
+ class ResidualDigraph :
public FilterArcs<
Undirector<const GR>,
typename Undirector<const GR>::template CombinedArcMap<
@@ -2730,7 +2730,7 @@
typedef TL Tolerance;
typedef typename CapacityMap::Value Value;
- typedef Residual Adaptor;
+ typedef ResidualDigraph Adaptor;
protected:
@@ -2761,8 +2761,8 @@
///
/// Constructor of the residual digraph adaptor. The parameters are the
/// digraph, the capacity map, the flow map, and a tolerance object.
- Residual(const Digraph& digraph, const CapacityMap& capacity,
- FlowMap& flow, const Tolerance& tolerance = Tolerance())
+ ResidualDigraph(const Digraph& digraph, const CapacityMap& capacity,
+ FlowMap& flow, const Tolerance& tolerance = Tolerance())
: Parent(), _capacity(&capacity), _flow(&flow), _graph(digraph),
_forward_filter(capacity, flow, tolerance),
_backward_filter(capacity, flow, tolerance),
@@ -2869,10 +2869,9 @@
/// \ingroup graph_adaptors
/// \relates Residual
template<typename GR, typename CM, typename FM>
- Residual<GR, CM, FM> residual(const GR& digraph,
- const CM& capacity_map,
- FM& flow_map) {
- return Residual<GR, CM, FM> (digraph, capacity_map, flow_map);
+ ResidualDigraph<GR, CM, FM>
+ residualDigraph(const GR& digraph, const CM& capacity_map, FM& flow_map) {
+ return ResidualDigraph<GR, CM, FM> (digraph, capacity_map, flow_map);
}
diff --git a/test/graph_adaptor_test.cc b/test/graph_adaptor_test.cc
--- a/test/graph_adaptor_test.cc
+++ b/test/graph_adaptor_test.cc
@@ -581,15 +581,15 @@
ea = a2;
}
-void checkResidual() {
+void checkResidualDigraph() {
// Check concepts
- checkConcept<concepts::Digraph, Residual<concepts::Digraph> >();
- checkConcept<concepts::Digraph, Residual<ListDigraph> >();
+ checkConcept<concepts::Digraph, ResidualDigraph<concepts::Digraph> >();
+ checkConcept<concepts::Digraph, ResidualDigraph<ListDigraph> >();
// Create a digraph and an adaptor
typedef ListDigraph Digraph;
typedef Digraph::ArcMap<int> IntArcMap;
- typedef Residual<Digraph, IntArcMap> Adaptor;
+ typedef ResidualDigraph<Digraph, IntArcMap> Adaptor;
Digraph digraph;
IntArcMap capacity(digraph), flow(digraph);
@@ -1470,7 +1470,7 @@
checkFilterNodes1();
checkFilterArcs();
checkUndirector();
- checkResidual();
+ checkResidualDigraph();
checkSplitNodes();
// Check the graph adaptors (using ListGraph)
More information about the Lemon-commits
mailing list