|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77074 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2012-02-19 15:06:16
Author: jewillco
Date: 2012-02-19 15:06:15 EST (Sun, 19 Feb 2012)
New Revision: 77074
URL: http://svn.boost.org/trac/boost/changeset/77074
Log:
Changed property map uses to not use operator[]
Text files modified:
trunk/boost/graph/edmonds_karp_max_flow.hpp | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
Modified: trunk/boost/graph/edmonds_karp_max_flow.hpp
==============================================================================
--- trunk/boost/graph/edmonds_karp_max_flow.hpp (original)
+++ trunk/boost/graph/edmonds_karp_max_flow.hpp 2012-02-19 15:06:15 EST (Sun, 19 Feb 2012)
@@ -52,21 +52,21 @@
// find minimum residual capacity along the augmenting path
FlowValue delta = (std::numeric_limits<FlowValue>::max)();
- e = p[sink];
+ e = get(p, sink);
do {
BOOST_USING_STD_MIN();
- delta = min BOOST_PREVENT_MACRO_SUBSTITUTION(delta, residual_capacity[e]);
+ delta = min BOOST_PREVENT_MACRO_SUBSTITUTION(delta, get(residual_capacity, e));
u = source(e, g);
- e = p[u];
+ e = get(p, u);
} while (u != src);
// push delta units of flow along the augmenting path
- e = p[sink];
+ e = get(p, sink);
do {
- residual_capacity[e] -= delta;
- residual_capacity[reverse_edge[e]] += delta;
+ put(residual_capacity, e, get(residual_capacity, e) - delta);
+ put(residual_capacity, get(reverse_edge, e), get(residual_capacity, get(reverse_edge, e)) + delta);
u = source(e, g);
- e = p[u];
+ e = get(p, u);
} while (u != src);
}
@@ -94,22 +94,22 @@
typename graph_traits<Graph>::out_edge_iterator ei, e_end;
for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
- res[*ei] = cap[*ei];
+ put(res, *ei, get(cap, *ei));
- color[sink] = Color::gray();
- while (color[sink] != Color::white()) {
+ put(color, sink, Color::gray());
+ while (get(color, sink) != Color::white()) {
boost::queue<vertex_t> Q;
breadth_first_search
(detail::residual_graph(g, res), src, Q,
make_bfs_visitor(record_edge_predecessors(pred, on_tree_edge())),
color);
- if (color[sink] != Color::white())
+ if (get(color, sink) != Color::white())
detail::augment(g, src, sink, pred, res, rev);
} // while
typename property_traits<CapacityEdgeMap>::value_type flow = 0;
for (boost::tie(ei, e_end) = out_edges(src, g); ei != e_end; ++ei)
- flow += (cap[*ei] - res[*ei]);
+ flow += (get(cap, *ei) - get(res, *ei));
return flow;
} // edmonds_karp_max_flow()
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk