Commit 9dc8c691 authored by Tiago Peixoto's avatar Tiago Peixoto

Get rid of inconsistent CamelCase in GraphInterface methods

parent fa6816e0
......@@ -140,10 +140,10 @@ void betweenness(GraphInterface& g, boost::any weight,
{
run_action<>()
(g, std::bind<>(get_weighted_betweenness(),
std::placeholders::_1, g.GetVertexIndex(),
std::placeholders::_1, g.get_vertex_index(),
std::placeholders::_2,
std::placeholders::_3, weight, normalize,
g.GetNumberOfVertices(), g.GetMaxEdgeIndex()),
g.get_num_vertices(), g.get_max_edge_index()),
edge_floating_properties(),
vertex_floating_properties())
(edge_betweenness, vertex_betweenness);
......@@ -152,9 +152,9 @@ void betweenness(GraphInterface& g, boost::any weight,
{
run_action<>()
(g, std::bind<void>(get_betweenness(), std::placeholders::_1,
g.GetVertexIndex(), std::placeholders::_2,
g.get_vertex_index(), std::placeholders::_2,
std::placeholders::_3, normalize,
g.GetNumberOfVertices()),
g.get_num_vertices()),
edge_floating_properties(),
vertex_floating_properties())
(edge_betweenness, vertex_betweenness);
......
......@@ -35,7 +35,7 @@ void do_get_closeness(GraphInterface& gi, boost::any weight,
{
run_action<>()(gi,
std::bind(get_closeness(), placeholders::_1,
gi.GetVertexIndex(), no_weightS(),
gi.get_vertex_index(), no_weightS(),
placeholders::_2, harmonic, norm),
writable_vertex_scalar_properties())(closeness);
}
......@@ -43,7 +43,7 @@ void do_get_closeness(GraphInterface& gi, boost::any weight,
{
run_action<>()(gi,
std::bind(get_closeness(), placeholders::_1,
gi.GetVertexIndex(), placeholders::_2,
gi.get_vertex_index(), placeholders::_2,
placeholders::_3, harmonic, norm),
edge_scalar_properties(),
writable_vertex_scalar_properties())(weight, closeness);
......
......@@ -38,7 +38,7 @@ size_t eigentrust(GraphInterface& g, boost::any c, boost::any t,
size_t iter = 0;
run_action<>()
(g, bind(get_eigentrust(),
_1, g.GetVertexIndex(), g.GetEdgeIndex(), _2,
_1, g.get_vertex_index(), g.get_edge_index(), _2,
_3, epslon, max_iter, ref(iter)),
writable_edge_scalar_properties(),
vertex_floating_properties())(c,t);
......
......@@ -42,7 +42,7 @@ long double eigenvector(GraphInterface& g, boost::any w, boost::any c,
long double eig = 0;
run_action<>()
(g, std::bind(get_eigenvector(), placeholders::_1, g.GetVertexIndex(),
(g, std::bind(get_eigenvector(), placeholders::_1, g.get_vertex_index(),
placeholders::_2, placeholders::_3, epsilon, max_iter,
std::ref(eig)),
weight_props_t(),
......
......@@ -68,7 +68,7 @@ long double hits(GraphInterface& g, boost::any w, boost::any x, boost::any y,
long double eig = 0;
run_action<>()
(g, std::bind(get_hits_dispatch(), placeholders::_1, g.GetVertexIndex(),
(g, std::bind(get_hits_dispatch(), placeholders::_1, g.get_vertex_index(),
placeholders::_2, placeholders::_3, y, epsilon, max_iter,
std::ref(eig)),
weight_props_t(),
......
......@@ -53,7 +53,7 @@ void katz(GraphInterface& g, boost::any w, boost::any c, boost::any beta,
if(beta.empty())
beta = beta_map_t(1.);
run_action<>()(g, std::bind(get_katz(), placeholders::_1, g.GetVertexIndex(),
run_action<>()(g, std::bind(get_katz(), placeholders::_1, g.get_vertex_index(),
placeholders::_2, placeholders::_3,
placeholders::_4, alpha, epsilon, max_iter),
weight_props_t(),
......
......@@ -42,7 +42,7 @@ size_t pagerank(GraphInterface& g, boost::any rank, boost::any pers,
pers_props_t;
if(pers.empty())
pers = pers_map_t(1.0 / g.GetNumberOfVertices());
pers = pers_map_t(1.0 / g.get_num_vertices());
typedef ConstantPropertyMap<double, GraphInterface::edge_t> weight_map_t;
typedef boost::mpl::push_back<edge_scalar_properties, weight_map_t>::type
......@@ -57,7 +57,7 @@ size_t pagerank(GraphInterface& g, boost::any rank, boost::any pers,
size_t iter;
run_action<>()
(g, std::bind(get_pagerank(),
placeholders::_1, g.GetVertexIndex(), placeholders::_2,
placeholders::_1, g.get_vertex_index(), placeholders::_2,
placeholders::_3, placeholders::_4, d,
epsilon, max_iter, std::ref(iter)),
vertex_floating_properties(),
......
......@@ -37,7 +37,7 @@ void trust_transitivity(GraphInterface& g, int64_t source, int64_t target,
throw ValueException("vertex property must be of floating point valued vector type");
run_action<>()(g,
bind<void>(get_trust_transitivity(), _1, g.GetVertexIndex(),
bind<void>(get_trust_transitivity(), _1, g.get_vertex_index(),
source, target, _2, _3),
edge_floating_properties(),
vertex_floating_vector_properties())(c,t);
......
......@@ -34,25 +34,25 @@ using namespace graph_tool;
boost::python::tuple global_clustering(GraphInterface& g)
{
double c, c_err;
bool directed = g.GetDirected();
g.SetDirected(false);
bool directed = g.get_directed();
g.set_directed(false);
run_action<graph_tool::detail::never_directed>()
(g, std::bind(get_global_clustering(), std::placeholders::_1,
std::ref(c), std::ref(c_err)))();
g.SetDirected(directed);
g.set_directed(directed);
return boost::python::make_tuple(c, c_err);
}
void local_clustering(GraphInterface& g, boost::any prop)
{
bool directed = g.GetDirected();
g.SetDirected(false);
bool directed = g.get_directed();
g.set_directed(false);
run_action<graph_tool::detail::never_directed>()
(g, std::bind(set_clustering_to_property(),
std::placeholders::_1,
std::placeholders::_2),
writable_vertex_scalar_properties())(prop);
g.SetDirected(directed);
g.set_directed(directed);
}
using namespace boost::python;
......
......@@ -82,7 +82,7 @@ void extended_clustering(GraphInterface& g, boost::python::list props)
boost::any vprop =
prop_vector<writable_vertex_scalar_properties>()
(cmaps, num_vertices(g.GetGraph()));
(cmaps, num_vertices(g.get_graph()));
if (vprop.empty())
throw ValueException("all vertex properties must be of the same"
" floating point type");
......@@ -93,7 +93,7 @@ void extended_clustering(GraphInterface& g, boost::python::list props)
run_action<>()
(g, std::bind<void>(get_extended_clustering(), placeholders::_1,
any_cast<GraphInterface::vertex_index_map_t>(g.GetVertexIndex()),
any_cast<GraphInterface::vertex_index_map_t>(g.get_vertex_index()),
placeholders::_2),
properties_vector()) (vprop);
}
......@@ -70,7 +70,7 @@ void get_motifs(GraphInterface& g, size_t k, boost::python::list subgraph_list,
bool fill_list, rng_t& rng)
{
boost::any list;
if (g.GetDirected())
if (g.get_directed())
list = vector<d_graph_t>();
else
list = vector<u_graph_t>();
......@@ -139,7 +139,7 @@ void get_motifs(GraphInterface& g, size_t k, boost::python::list subgraph_list,
{
GraphInterface sub;
sub.SetDirected(g.GetDirected());
sub.set_directed(g.get_directed());
typedef graph_tool::detail::get_all_graph_views::apply
<graph_tool::detail::filt_scalar_type,
boost::mpl::bool_<false>, boost::mpl::bool_<false>,
......
......@@ -179,16 +179,16 @@ boost::any do_create_emat(GraphInterface& gi, boost::any ob,
vmap_t;
vmap_t b = any_cast<vmap_t>(ob);
if (gi.GetDirected())
if (gi.get_directed())
{
run_action<>()(gi, std::bind<void>(create_emat(), placeholders::_1,
std::ref(b),
std::ref(bgi.GetGraph()),
std::ref(bgi.get_graph()),
std::ref(emat)))();
}
else
{
UndirectedAdaptor<GraphInterface::multigraph_t> ug(bgi.GetGraph());
UndirectedAdaptor<GraphInterface::multigraph_t> ug(bgi.get_graph());
run_action<>()(gi, std::bind<void>(create_emat(), placeholders::_1,
std::ref(b),
std::ref(ug),
......@@ -206,17 +206,17 @@ boost::any do_create_ehash(GraphInterface& gi, boost::any ob,
vmap_t;
vmap_t b = any_cast<vmap_t>(ob);
if (gi.GetDirected())
if (gi.get_directed())
{
run_action<>()(gi, std::bind<void>(create_ehash(), placeholders::_1,
std::ref(b),
std::ref(bgi.GetGraph()),
std::ref(bgi.get_graph()),
std::ref(emat),
std::ref(rng)))();
}
else
{
UndirectedAdaptor<GraphInterface::multigraph_t> ug(bgi.GetGraph());
UndirectedAdaptor<GraphInterface::multigraph_t> ug(bgi.get_graph());
run_action<>()(gi, std::bind<void>(create_ehash(), placeholders::_1,
std::ref(b),
std::ref(ug),
......@@ -293,11 +293,11 @@ struct move_sweep_dispatch
if (is_directed::apply<Graph>::type::value)
{
dispatch(mrs, mrp, mrm, wr, b, g, emat, sampler, cavity_sampler,
bgi.GetGraph(), weighted);
bgi.get_graph(), weighted);
}
else
{
UndirectedAdaptor<GraphInterface::multigraph_t> ug(bgi.GetGraph());
UndirectedAdaptor<GraphInterface::multigraph_t> ug(bgi.get_graph());
dispatch(mrs, mrp, mrm, wr, b, g, emat, sampler, cavity_sampler, ug,
weighted);
}
......@@ -489,7 +489,7 @@ boost::python::object do_move_sweep(GraphInterface& gi, GraphInterface& bgi,
label, vlist, block_list,
target_list, deg_corr, dense, multigraph,
beta, sequential, parallel, random_move, c, verbose,
gi.GetMaxEdgeIndex(), nmerges, niter, merge_map,
gi.get_max_edge_index(), nmerges, niter, merge_map,
partition_stats, rng, S, nmoves, bgi),
mrs, mrp, mrm, wr, b, placeholders::_1,
std::ref(emat), sampler, cavity_sampler, weighted))();
......@@ -531,11 +531,11 @@ boost::any do_build_egroups(GraphInterface& gi, GraphInterface& bgi,
boost::any oegroups;
run_action<graph_tool::detail::all_graph_views, boost::mpl::true_>()
(gi, std::bind<void>(build_egroups(), b, std::ref(oegroups),
esrcpos.get_unchecked(gi.GetMaxEdgeIndex()),
etgtpos.get_unchecked(gi.GetMaxEdgeIndex()),
eweights.get_unchecked(gi.GetMaxEdgeIndex()),
placeholders::_1, bgi.GetVertexIndex(),
bgi.GetNumberOfVertices(), weighted, empty))();
esrcpos.get_unchecked(gi.get_max_edge_index()),
etgtpos.get_unchecked(gi.get_max_edge_index()),
eweights.get_unchecked(gi.get_max_edge_index()),
placeholders::_1, bgi.get_vertex_index(),
bgi.get_num_vertices(), weighted, empty))();
return oegroups;
}
......@@ -580,7 +580,7 @@ void do_collect_edge_marginals(GraphInterface& gi, GraphInterface& gbi,
run_action<graph_tool::detail::all_graph_views, boost::mpl::true_>()
(gi, std::bind<void>(collect_edge_marginals_dispatch(),
placeholders::_1, B, b, p,
std::tuple<boost::any, GraphInterface&>(gbi.GetGraphView(), gbi)))();
std::tuple<boost::any, GraphInterface&>(gbi.get_graph_view(), gbi)))();
}
boost::python::tuple do_bethe_entropy(GraphInterface& gi, size_t B, boost::any op,
......
......@@ -151,13 +151,13 @@ struct cov_move_sweep_dispatch
{
vector<std::reference_wrapper<Graph>> gs;
for (GraphInterface& ag : ags)
gs.push_back(*any_cast<Graph*>(ag.GetGraphView()));
gs.push_back(*any_cast<Graph*>(ag.get_graph_view()));
if (is_directed::apply<Graph>::type::value)
{
vector<std::reference_wrapper<GraphInterface::multigraph_t>> bgs;
for (GraphInterface& bgi : bgis)
bgs.push_back(bgi.GetGraph());
bgs.push_back(bgi.get_graph());
dispatch(mrs, mrp, mrm, wr, b, bs, g, gs, emat, sampler,
cavity_sampler, bgs, weighted);
}
......@@ -165,7 +165,7 @@ struct cov_move_sweep_dispatch
{
vector<UndirectedAdaptor<GraphInterface::multigraph_t>> ubgs;
for (GraphInterface& bgi : bgis)
ubgs.push_back(UndirectedAdaptor<GraphInterface::multigraph_t>(bgi.GetGraph()));
ubgs.push_back(UndirectedAdaptor<GraphInterface::multigraph_t>(bgi.get_graph()));
vector<std::reference_wrapper<UndirectedAdaptor<GraphInterface::multigraph_t>>> rubgs;
for (auto& bg : ubgs)
rubgs.push_back(bg);
......@@ -577,7 +577,7 @@ boost::python::object do_cov_move_sweep(GraphInterface& gi,
vector<size_t> eidx;
for (GraphInterface& g : gis)
eidx.push_back(g.GetMaxEdgeIndex());
eidx.push_back(g.get_max_edge_index());
auto bgi = from_rlist<GraphInterface>(obgi);
......@@ -606,7 +606,7 @@ boost::python::object do_cov_move_sweep(GraphInterface& gi,
label, vlist, block_list, target_blocks, deg_corr, dense,
multigraph, beta, sequential, parallel, random_move,
node_coherent, confine_layers, c, verbose,
gi.GetMaxEdgeIndex(), eidx, nmerges, niter, merge_map,
gi.get_max_edge_index(), eidx, nmerges, niter, merge_map,
partition_stats, overlap_partition_stats, overlap_stats,
master, slave, rng, S, nmoves, bgi, bmap, brmap, free_blocks, B),
std::ref(mrs), std::ref(mrp), std::ref(mrm), std::ref(wr),
......@@ -653,7 +653,7 @@ void do_ec_hist(GraphInterface& gi, boost::any& aevc, boost::any& aec)
GraphInterface::edge_index_map_t>::type
emap_t;
typename emap_t::unchecked_t ec =
any_cast<emap_t&>(aec).get_unchecked(gi.GetMaxEdgeIndex());
any_cast<emap_t&>(aec).get_unchecked(gi.get_max_edge_index());
run_action<>()(gi, std::bind<void>(ec_hist(), placeholders::_1,
placeholders::_2, std::ref(ec)),
edge_properties())(aevc);
......
......@@ -83,7 +83,7 @@ struct split_graph
auto iter = vhmap[v].find(l);
if (iter == vhmap[v].end())
{
size_t u = add_vertex(us[l].get().GetGraph());
size_t u = add_vertex(us[l].get().get_graph());
vhmap[v][l] = u;
size_t pos = lower_bound(vc[v].begin(), vc[v].end(), l) - vc[v].begin();
vc[v].insert(vc[v].begin() + pos, l);
......@@ -124,7 +124,7 @@ struct split_graph
auto u_s = get_v(s, l);
auto u_t = get_v(t, l);
auto ne = add_edge(u_s, u_t, us[l].get().GetGraph()).first;
auto ne = add_edge(u_s, u_t, us[l].get().get_graph()).first;
ueweight[l].get()[ne] = eweight[e];
}
}
......
......@@ -116,11 +116,11 @@ struct move_sweep_overlap_dispatch
if (is_directed::apply<Graph>::type::value)
{
dispatch(mrs, mrp, mrm, wr, b, g, emat, sampler, cavity_sampler,
bgi.GetGraph(), weighted);
bgi.get_graph(), weighted);
}
else
{
UndirectedAdaptor<GraphInterface::multigraph_t> ug(bgi.GetGraph());
UndirectedAdaptor<GraphInterface::multigraph_t> ug(bgi.get_graph());
dispatch(mrs, mrp, mrm, wr, b, g, emat, sampler, cavity_sampler, ug,
weighted);
}
......@@ -324,7 +324,7 @@ do_move_sweep_overlap(GraphInterface& gi, GraphInterface& bgi, boost::any& emat,
(eweight, vweight, oegroups, esrcpos, etgtpos,
label, vlist, block_list, target_blocks, deg_corr, dense,
multigraph, parallel_edges, beta, sequential, parallel,
random_move, c, node_coherent, verbose, gi.GetMaxEdgeIndex(),
random_move, c, node_coherent, verbose, gi.get_max_edge_index(),
nmerges, niter, merge_map, overlap_stats, partition_stats,
rng, S, nmoves, bgi),
mrs, mrp, mrm, wr, b, placeholders::_1,
......@@ -476,7 +476,7 @@ void do_get_eg_overlap(GraphInterface& gi, GraphInterface& egi, boost::any obe,
emap_t eindex = any_cast<emap_t>(oeindex);
run_action<>()(gi, std::bind(get_eg_overlap(), placeholders::_1,
std::ref(egi.GetGraph()), be, b, node_index,
std::ref(egi.get_graph()), be, b, node_index,
half_edges, eindex))();
}
......@@ -534,7 +534,7 @@ void do_get_be_overlap(GraphInterface& gi, GraphInterface& egi, boost::any obe,
vimap_t node_index = any_cast<vimap_t>(onode_index);
run_action<>()(gi, std::bind(get_be_overlap(), placeholders::_1,
std::ref(egi.GetGraph()), be, b,
std::ref(egi.get_graph()), be, b,
node_index))();
}
......
......@@ -66,7 +66,7 @@ void community_structure(GraphInterface& g, double gamma, string corr_name,
throw ValueException("invalid correlation type: " + corr_name);
run_action<graph_tool::detail::never_directed>()
(g, std::bind(get_communities_selector(corr, g.GetVertexIndex()),
(g, std::bind(get_communities_selector(corr, g.get_vertex_index()),
placeholders::_1, placeholders::_2, placeholders::_3, gamma, n_iter,
make_pair(Tmin, Tmax), Nspins,
std::ref(rng), make_pair(verbose,history_file)),
......
......@@ -101,7 +101,7 @@ void community_network(GraphInterface& gi, GraphInterface& cgi,
run_action<>()
(gi, std::bind(get_community_network_vertices_dispatch(),
placeholders::_1, std::ref(cgi.GetGraph()),
placeholders::_1, std::ref(cgi.get_graph()),
placeholders::_2, condensed_community_property,
placeholders::_3, vertex_count),
writable_vertex_properties(), vweight_properties())
......
......@@ -68,7 +68,7 @@ void sum_eprops(GraphInterface& gi, GraphInterface& cgi,
run_action<graph_tool::detail::always_directed>()
(gi, std::bind(get_edge_sum_dispatch(),
placeholders::_1, std::ref(cgi.GetGraph()),
placeholders::_1, std::ref(cgi.get_graph()),
placeholders::_2,
condensed_community_property, placeholders::_3, ceprop,
self_loops),
......
......@@ -76,7 +76,7 @@ void community_network_edges(GraphInterface& gi, GraphInterface& cgi,
run_action<>()
(gi, std::bind(get_community_network_edges_dispatch(self_loops, parallel_edges),
placeholders::_1, std::ref(cgi.GetGraph()), cgi.GetEdgeIndex(),
placeholders::_1, std::ref(cgi.get_graph()), cgi.get_edge_index(),
placeholders::_2, condensed_community_property,
placeholders::_3, edge_count),
writable_vertex_properties(), eweight_properties())
......
......@@ -107,7 +107,7 @@ void community_network_vavg(GraphInterface& gi, GraphInterface& cgi,
// sum weighted values
run_action<graph_tool::detail::always_directed_never_reversed>()
(gi, std::bind(get_vertex_sum_dispatch(),
placeholders::_1, std::ref(cgi.GetGraph()),
placeholders::_1, std::ref(cgi.get_graph()),
placeholders::_2,
condensed_community_property,
placeholders::_3, cvprop),
......@@ -119,7 +119,7 @@ void community_network_vavg(GraphInterface& gi, GraphInterface& cgi,
// sum unweighted values
run_action<graph_tool::detail::always_directed_never_reversed>()
(gi, std::bind(get_vertex_sum_dispatch(),
placeholders::_1, std::ref(cgi.GetGraph()),
placeholders::_1, std::ref(cgi.get_graph()),
placeholders::_2,
condensed_community_property,
placeholders::_3, cvprop),
......
......@@ -75,25 +75,25 @@ struct get_avg_correlation
continue;
put_point(v, deg1, deg2, g, weight, s_sum, s_sum2, s_count);
}
s_sum.Gather();
s_sum2.Gather();
s_count.Gather();
s_sum.gather();
s_sum2.gather();
s_count.gather();
for (i = 0; i < int(sum.GetArray().size()); ++i)
for (i = 0; i < int(sum.get_array().size()); ++i)
{
sum.GetArray()[i] /= count.GetArray()[i];
sum2.GetArray()[i] =
sqrt(abs(sum2.GetArray()[i]/count.GetArray()[i] -
sum.GetArray()[i] * sum.GetArray()[i])) /
sqrt(count.GetArray()[i]);
sum.get_array()[i] /= count.get_array()[i];
sum2.get_array()[i] =
sqrt(abs(sum2.get_array()[i]/count.get_array()[i] -
sum.get_array()[i] * sum.get_array()[i])) /
sqrt(count.get_array()[i]);
}
bins = sum.GetBins();
bins = sum.get_bins();
python::list ret_bins;
ret_bins.append(wrap_vector_owned(bins[0]));
_ret_bins = ret_bins;
_avg = wrap_multi_array_owned<avg_type,1>(sum.GetArray());
_dev = wrap_multi_array_owned<avg_type,1>(sum2.GetArray());
_avg = wrap_multi_array_owned<avg_type,1>(sum.get_array());
_dev = wrap_multi_array_owned<avg_type,1>(sum2.get_array());
}
python::object& _avg;
python::object& _dev;
......
......@@ -71,12 +71,12 @@ struct get_correlation_histogram
}
}
bins = hist.GetBins();
bins = hist.get_bins();
python::list ret_bins;
ret_bins.append(wrap_vector_owned(bins[0]));
ret_bins.append(wrap_vector_owned(bins[1]));
_ret_bins = ret_bins;
_hist = wrap_multi_array_owned<count_type,2>(hist.GetArray());
_hist = wrap_multi_array_owned<count_type,2>(hist.get_array());
}
python::object& _hist;
const std::array<vector<long double>,2>& _bins;
......
......@@ -50,7 +50,7 @@ public:
for (tie(e,e_end) = out_edges(v, g); e != e_end; ++e)
{
k[1] = deg2(target(*e,g),g);
hist.PutValue(k, get(weight, *e));
hist.put_value(k, get(weight, *e));
}
}
......@@ -67,9 +67,9 @@ public:
for (tie(e,e_end) = out_edges(v, g); e != e_end; ++e)
{
k2 = deg2(target(*e,g),g)*get(weight, *e);
sum.PutValue(k1, k2);
sum2.PutValue(k1, k2*k2);
count.PutValue(k1, get(weight, *e));
sum.put_value(k1, k2);
sum2.put_value(k1, k2*k2);
count.put_value(k1, get(weight, *e));
}
}
};
......@@ -87,7 +87,7 @@ public:
typename Hist::point_t k;
k[0] = deg1(v, g);
k[1] = deg2(v, g);
hist.PutValue(k);
hist.put_value(k);
}
template <class Graph, class Deg1, class Deg2, class Sum, class Count,
......@@ -100,9 +100,9 @@ public:
k1[0] = deg1(v, g);
typename Sum::count_type k2;
k2 = deg2(v, g);
sum.PutValue(k1, k2);
sum2.PutValue(k1, k2*k2);
count.PutValue(k1, 1);
sum.put_value(k1, k2);
sum2.put_value(k1, k2*k2);
count.put_value(k1, 1);
}
};
......
......@@ -264,5 +264,5 @@ void get_cts(GraphInterface& gi, GraphInterface& tgi, boost::any otpos,
placeholders::_3, beta, cts, is_tree, max_depth),
get_pointers::apply<graph_tool::detail::always_directed>::type(),
vertex_scalar_vector_properties())
(tgi.GetGraphView(), otpos);
(tgi.get_graph_view(), otpos);
}
......@@ -70,8 +70,8 @@ void edmonds_karp_max_flow(GraphInterface& gi, size_t src, size_t sink,
{
run_action<graph_tool::detail::always_directed>()
(gi, std::bind(get_edmonds_karp_max_flow(),
placeholders::_1, gi.GetVertexIndex(), gi.GetEdgeIndex(),
gi.GetMaxEdgeIndex(),
placeholders