Commit 4fa837b9 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Change graph_tool::detail::all_graph_views to graph_tool::all_graph_views

parent 9bb015d7
...@@ -484,7 +484,7 @@ boost::python::object do_move_sweep(GraphInterface& gi, GraphInterface& bgi, ...@@ -484,7 +484,7 @@ boost::python::object do_move_sweep(GraphInterface& gi, GraphInterface& bgi,
vmap_t merge_map = any_cast<vmap_t>(omerge_map); vmap_t merge_map = any_cast<vmap_t>(omerge_map);
run_action<graph_tool::detail::all_graph_views, boost::mpl::true_>() run_action<graph_tool::all_graph_views, boost::mpl::true_>()
(gi, std::bind(move_sweep_dispatch<emap_t, vmap_t, vemap_t> (gi, std::bind(move_sweep_dispatch<emap_t, vmap_t, vemap_t>
(eweight, vweight, oegroups, esrcpos, etgtpos, (eweight, vweight, oegroups, esrcpos, etgtpos,
label, vlist, block_list, label, vlist, block_list,
...@@ -530,7 +530,7 @@ boost::any do_build_egroups(GraphInterface& gi, GraphInterface& bgi, ...@@ -530,7 +530,7 @@ boost::any do_build_egroups(GraphInterface& gi, GraphInterface& bgi,
emap_t eweights = any_cast<emap_t>(oeweights); emap_t eweights = any_cast<emap_t>(oeweights);
boost::any oegroups; boost::any oegroups;
run_action<graph_tool::detail::all_graph_views, boost::mpl::true_>() run_action<graph_tool::all_graph_views, boost::mpl::true_>()
(gi, std::bind<void>(build_egroups(), b, std::ref(oegroups), (gi, std::bind<void>(build_egroups(), b, std::ref(oegroups),
esrcpos.get_unchecked(gi.get_edge_index_range()), esrcpos.get_unchecked(gi.get_edge_index_range()),
etgtpos.get_unchecked(gi.get_edge_index_range()), etgtpos.get_unchecked(gi.get_edge_index_range()),
...@@ -549,7 +549,7 @@ boost::any do_init_neighbour_sampler(GraphInterface& gi, boost::any oeweights, ...@@ -549,7 +549,7 @@ boost::any do_init_neighbour_sampler(GraphInterface& gi, boost::any oeweights,
emap_t eweights = any_cast<emap_t>(oeweights); emap_t eweights = any_cast<emap_t>(oeweights);
boost::any osampler; boost::any osampler;
run_action<graph_tool::detail::all_graph_views, boost::mpl::true_>() run_action<graph_tool::all_graph_views, boost::mpl::true_>()
(gi, std::bind(init_neighbour_sampler(), std::placeholders::_1, eweights, (gi, std::bind(init_neighbour_sampler(), std::placeholders::_1, eweights,
self_loops, empty, std::ref(osampler)))(); self_loops, empty, std::ref(osampler)))();
return osampler; return osampler;
...@@ -596,7 +596,7 @@ boost::python::tuple do_bethe_entropy(GraphInterface& gi, size_t B, boost::any o ...@@ -596,7 +596,7 @@ boost::python::tuple do_bethe_entropy(GraphInterface& gi, size_t B, boost::any o
vmap_t pv = any_cast<vmap_t>(opv); vmap_t pv = any_cast<vmap_t>(opv);
double H=0, sH=0, Hmf=0, sHmf=0; double H=0, sH=0, Hmf=0, sHmf=0;
run_action<graph_tool::detail::all_graph_views, boost::mpl::true_>() run_action<graph_tool::all_graph_views, boost::mpl::true_>()
(gi, std::bind<void>(bethe_entropy(), (gi, std::bind<void>(bethe_entropy(),
std::placeholders::_1, B, p, pv, std::ref(H), std::placeholders::_1, B, p, pv, std::ref(H),
std::ref(sH), std::ref(Hmf), std::ref(sHmf)))(); std::ref(sH), std::ref(Hmf), std::ref(sHmf)))();
...@@ -623,7 +623,7 @@ void do_collect_vertex_marginals(GraphInterface& gi, boost::any ob, ...@@ -623,7 +623,7 @@ void do_collect_vertex_marginals(GraphInterface& gi, boost::any ob,
vmap_t; vmap_t;
vmap_t b = any_cast<vmap_t>(ob); vmap_t b = any_cast<vmap_t>(ob);
run_action<graph_tool::detail::all_graph_views, boost::mpl::true_>() run_action<graph_tool::all_graph_views, boost::mpl::true_>()
(gi, std::bind(collect_vertex_marginals_dispatch(), (gi, std::bind(collect_vertex_marginals_dispatch(),
std::placeholders::_1, b, std::placeholders::_2), std::placeholders::_1, b, std::placeholders::_2),
vertex_scalar_vector_properties())(op); vertex_scalar_vector_properties())(op);
......
...@@ -600,7 +600,7 @@ boost::python::object do_cov_move_sweep(GraphInterface& gi, ...@@ -600,7 +600,7 @@ boost::python::object do_cov_move_sweep(GraphInterface& gi,
bool node_coherent = python::extract<bool>(onode_coherent[0]); bool node_coherent = python::extract<bool>(onode_coherent[0]);
bool confine_layers = python::extract<bool>(onode_coherent[1]); bool confine_layers = python::extract<bool>(onode_coherent[1]);
run_action<graph_tool::detail::all_graph_views, boost::mpl::true_>() run_action<graph_tool::all_graph_views, boost::mpl::true_>()
(gi, std::bind(cov_move_sweep_dispatch<emap_t, vmap_t, vvmap_t, emap_t, bmap_t> (gi, std::bind(cov_move_sweep_dispatch<emap_t, vmap_t, vvmap_t, emap_t, bmap_t>
(ce, cv, vmap, eweight, vweight, egroups, esrcpos, etgtpos, (ce, cv, vmap, eweight, vweight, egroups, esrcpos, etgtpos,
label, vlist, block_list, target_blocks, deg_corr, dense, label, vlist, block_list, target_blocks, deg_corr, dense,
......
...@@ -320,7 +320,7 @@ do_move_sweep_overlap(GraphInterface& gi, GraphInterface& bgi, boost::any& emat, ...@@ -320,7 +320,7 @@ do_move_sweep_overlap(GraphInterface& gi, GraphInterface& bgi, boost::any& emat,
vmap_t merge_map = any_cast<vmap_t>(omerge_map); vmap_t merge_map = any_cast<vmap_t>(omerge_map);
run_action<graph_tool::detail::all_graph_views, boost::mpl::true_>() run_action<graph_tool::all_graph_views, boost::mpl::true_>()
(gi, std::bind(move_sweep_overlap_dispatch<emap_t, vmap_t, vemap_t> (gi, std::bind(move_sweep_overlap_dispatch<emap_t, vmap_t, vemap_t>
(eweight, vweight, oegroups, esrcpos, etgtpos, (eweight, vweight, oegroups, esrcpos, etgtpos,
label, vlist, block_list, target_blocks, deg_corr, dense, label, vlist, block_list, target_blocks, deg_corr, dense,
......
...@@ -544,9 +544,9 @@ void export_python_interface() ...@@ -544,9 +544,9 @@ void export_python_interface()
class_<VertexBase>("VertexBase", no_init); class_<VertexBase>("VertexBase", no_init);
class_<EdgeBase>("EdgeBase", no_init); class_<EdgeBase>("EdgeBase", no_init);
typedef boost::mpl::transform<graph_tool::detail::all_graph_views, typedef boost::mpl::transform<graph_tool::all_graph_views,
boost::mpl::quote1<std::add_const> >::type const_graph_views; boost::mpl::quote1<std::add_const> >::type const_graph_views;
typedef boost::mpl::transform<graph_tool::detail::all_graph_views, typedef boost::mpl::transform<graph_tool::all_graph_views,
boost::mpl::quote1<std::add_pointer> >::type all_graph_views; boost::mpl::quote1<std::add_pointer> >::type all_graph_views;
typedef boost::mpl::transform<const_graph_views, typedef boost::mpl::transform<const_graph_views,
boost::mpl::quote1<std::add_pointer> >::type all_const_graph_views; boost::mpl::quote1<std::add_pointer> >::type all_const_graph_views;
......
...@@ -68,9 +68,9 @@ struct export_vertex_property_map ...@@ -68,9 +68,9 @@ struct export_vertex_property_map
.def("resize", &pmap_t::resize) .def("resize", &pmap_t::resize)
.def("shrink_to_fit", &pmap_t::shrink_to_fit); .def("shrink_to_fit", &pmap_t::shrink_to_fit);
typedef boost::mpl::transform<graph_tool::detail::all_graph_views, typedef boost::mpl::transform<graph_tool::all_graph_views,
boost::mpl::quote1<std::add_const> >::type const_graph_views; boost::mpl::quote1<std::add_const> >::type const_graph_views;
typedef boost::mpl::transform<graph_tool::detail::all_graph_views, typedef boost::mpl::transform<graph_tool::all_graph_views,
boost::mpl::quote1<std::add_pointer> >::type all_graph_views; boost::mpl::quote1<std::add_pointer> >::type all_graph_views;
typedef boost::mpl::transform<const_graph_views, typedef boost::mpl::transform<const_graph_views,
boost::mpl::quote1<std::add_pointer> >::type all_const_graph_views; boost::mpl::quote1<std::add_pointer> >::type all_const_graph_views;
...@@ -153,9 +153,9 @@ struct export_edge_property_map ...@@ -153,9 +153,9 @@ struct export_edge_property_map
.def("shrink_to_fit", &pmap_t::shrink_to_fit); .def("shrink_to_fit", &pmap_t::shrink_to_fit);
typedef boost::mpl::transform<graph_tool::detail::all_graph_views, typedef boost::mpl::transform<graph_tool::all_graph_views,
boost::mpl::quote1<std::add_const> >::type const_graph_views; boost::mpl::quote1<std::add_const> >::type const_graph_views;
typedef boost::mpl::transform<graph_tool::detail::all_graph_views, typedef boost::mpl::transform<graph_tool::all_graph_views,
boost::mpl::quote1<std::add_pointer> >::type all_graph_views; boost::mpl::quote1<std::add_pointer> >::type all_graph_views;
typedef boost::mpl::transform<const_graph_views, typedef boost::mpl::transform<const_graph_views,
boost::mpl::quote1<std::add_pointer> >::type all_const_graph_views; boost::mpl::quote1<std::add_pointer> >::type all_const_graph_views;
......
...@@ -354,7 +354,7 @@ void do_add_edge_list_hashed(GraphInterface& gi, python::object aedge_list, ...@@ -354,7 +354,7 @@ void do_add_edge_list_hashed(GraphInterface& gi, python::object aedge_list,
int8_t, int16_t, int32_t, int64_t, uint64_t, double, int8_t, int16_t, int32_t, int64_t, uint64_t, double,
long double> vals_t; long double> vals_t;
bool found = false; bool found = false;
run_action<graph_tool::detail::all_graph_views, boost::mpl::true_>() run_action<graph_tool::all_graph_views, boost::mpl::true_>()
(gi, std::bind(add_edge_list_hash<vals_t>(), std::placeholders::_1, (gi, std::bind(add_edge_list_hash<vals_t>(), std::placeholders::_1,
aedge_list, std::placeholders::_2, std::ref(found), aedge_list, std::placeholders::_2, std::ref(found),
is_str, std::ref(eprops)), is_str, std::ref(eprops)),
......
...@@ -94,7 +94,7 @@ void a_star_search(GraphInterface& g, size_t source, boost::any dist_map, ...@@ -94,7 +94,7 @@ void a_star_search(GraphInterface& g, size_t source, boost::any dist_map,
typedef typename property_map_type:: typedef typename property_map_type::
apply<int64_t, GraphInterface::vertex_index_map_t>::type pred_t; apply<int64_t, GraphInterface::vertex_index_map_t>::type pred_t;
pred_t pred = any_cast<pred_t>(pred_map); pred_t pred = any_cast<pred_t>(pred_map);
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(g, std::bind(do_astar_search(), std::placeholders::_1, source, (g, std::bind(do_astar_search(), std::placeholders::_1, source,
std::placeholders::_2, pred, weight, std::placeholders::_2, pred, weight,
AStarVisitorWrapper(g, vis), make_pair(AStarCmp(cmp), AStarVisitorWrapper(g, vis), make_pair(AStarCmp(cmp),
...@@ -140,7 +140,7 @@ boost::python::object astar_search_generator(GraphInterface& g, ...@@ -140,7 +140,7 @@ boost::python::object astar_search_generator(GraphInterface& g,
auto dispatch = [&](auto& yield) auto dispatch = [&](auto& yield)
{ {
AStarGeneratorVisitor vis(g, yield); AStarGeneratorVisitor vis(g, yield);
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(g, std::bind(do_astar_search(), std::placeholders::_1, source, (g, std::bind(do_astar_search(), std::placeholders::_1, source,
std::placeholders::_2, dummy_property_map(), weight, std::placeholders::_2, dummy_property_map(), weight,
vis, make_pair(AStarCmp(cmp), AStarCmb(cmb)), vis, make_pair(AStarCmp(cmp), AStarCmb(cmb)),
...@@ -165,7 +165,7 @@ boost::python::object astar_search_generator_fast(GraphInterface& g, ...@@ -165,7 +165,7 @@ boost::python::object astar_search_generator_fast(GraphInterface& g,
auto dispatch = [&](auto& yield) auto dispatch = [&](auto& yield)
{ {
AStarGeneratorVisitor vis(g, yield); AStarGeneratorVisitor vis(g, yield);
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(g, std::bind(do_astar_search_fast(), std::placeholders::_1, source, (g, std::bind(do_astar_search_fast(), std::placeholders::_1, source,
std::placeholders::_2, std::placeholders::_3, std::placeholders::_2, std::placeholders::_3,
vis, make_pair(zero, inf), h, std::ref(g)), vis, make_pair(zero, inf), h, std::ref(g)),
......
...@@ -71,7 +71,7 @@ void a_star_search_implicit(GraphInterface& g, size_t source, ...@@ -71,7 +71,7 @@ void a_star_search_implicit(GraphInterface& g, size_t source,
python::object cmb, python::object zero, python::object cmb, python::object zero,
python::object inf, python::object h) python::object inf, python::object h)
{ {
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(g, std::bind(do_astar_search(), std::placeholders::_1, source, (g, std::bind(do_astar_search(), std::placeholders::_1, source,
std::placeholders::_2, make_pair(pred, cost), std::placeholders::_2, make_pair(pred, cost),
weight, weight,
......
...@@ -151,7 +151,7 @@ bool bellman_ford_search(GraphInterface& g, size_t source, boost::any dist_map, ...@@ -151,7 +151,7 @@ bool bellman_ford_search(GraphInterface& g, size_t source, boost::any dist_map,
python::object inf) python::object inf)
{ {
bool ret = false; bool ret = false;
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(g, std::bind(do_bf_search(), std::placeholders::_1, source, (g, std::bind(do_bf_search(), std::placeholders::_1, source,
std::placeholders::_2, pred_map, weight, std::placeholders::_2, pred_map, weight,
BFVisitorWrapper(g, vis), BFVisitorWrapper(g, vis),
......
...@@ -118,7 +118,7 @@ struct do_bfs ...@@ -118,7 +118,7 @@ struct do_bfs
void bfs_search(GraphInterface& g, size_t s, python::object vis) void bfs_search(GraphInterface& g, size_t s, python::object vis)
{ {
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(g, std::bind(do_bfs(), std::placeholders::_1, s, (g, std::bind(do_bfs(), std::placeholders::_1, s,
BFSVisitorWrapper(g, vis)))(); BFSVisitorWrapper(g, vis)))();
} }
...@@ -152,7 +152,7 @@ boost::python::object bfs_search_generator(GraphInterface& g, size_t s) ...@@ -152,7 +152,7 @@ boost::python::object bfs_search_generator(GraphInterface& g, size_t s)
auto dispatch = [&](auto& yield) auto dispatch = [&](auto& yield)
{ {
BFSGeneratorVisitor vis(g, yield); BFSGeneratorVisitor vis(g, yield);
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(g, std::bind(do_bfs(), std::placeholders::_1, s, vis))(); (g, std::bind(do_bfs(), std::placeholders::_1, s, vis))();
}; };
return boost::python::object(CoroGenerator(dispatch)); return boost::python::object(CoroGenerator(dispatch));
......
...@@ -107,7 +107,7 @@ struct do_dfs ...@@ -107,7 +107,7 @@ struct do_dfs
void dfs_search(GraphInterface& g, size_t s, python::object vis) void dfs_search(GraphInterface& g, size_t s, python::object vis)
{ {
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(g, std::bind(do_dfs(), std::placeholders::_1, g.get_vertex_index(), (g, std::bind(do_dfs(), std::placeholders::_1, g.get_vertex_index(),
s, DFSVisitorWrapper(g, vis)))(); s, DFSVisitorWrapper(g, vis)))();
} }
...@@ -142,7 +142,7 @@ boost::python::object dfs_search_generator(GraphInterface& g, size_t s) ...@@ -142,7 +142,7 @@ boost::python::object dfs_search_generator(GraphInterface& g, size_t s)
auto dispatch = [&](auto& yield) auto dispatch = [&](auto& yield)
{ {
DFSGeneratorVisitor vis(g, yield); DFSGeneratorVisitor vis(g, yield);
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(g, std::bind(do_dfs(), std::placeholders::_1, (g, std::bind(do_dfs(), std::placeholders::_1,
g.get_vertex_index(), s, vis))(); g.get_vertex_index(), s, vis))();
}; };
......
...@@ -174,7 +174,7 @@ void dijkstra_search(GraphInterface& g, size_t source, boost::any dist_map, ...@@ -174,7 +174,7 @@ void dijkstra_search(GraphInterface& g, size_t source, boost::any dist_map,
typedef typename property_map_type:: typedef typename property_map_type::
apply<int64_t, GraphInterface::vertex_index_map_t>::type pred_t; apply<int64_t, GraphInterface::vertex_index_map_t>::type pred_t;
pred_t pred = any_cast<pred_t>(pred_map); pred_t pred = any_cast<pred_t>(pred_map);
run_action<graph_tool::detail::all_graph_views, mpl::true_>() run_action<graph_tool::all_graph_views, mpl::true_>()
(g, std::bind(do_djk_search(), std::placeholders::_1, source, (g, std::bind(do_djk_search(), std::placeholders::_1, source,
std::placeholders::_2, pred, weight, std::placeholders::_2, pred, weight,
DJKVisitorWrapper(g, vis), DJKCmp(cmp), DJKCmb(cmb), DJKVisitorWrapper(g, vis), DJKCmp(cmp), DJKCmb(cmb),
...@@ -218,7 +218,7 @@ boost::python::object dijkstra_search_generator(GraphInterface& g, ...@@ -218,7 +218,7 @@ boost::python::object dijkstra_search_generator(GraphInterface& g,
auto dispatch = [&](auto& yield) auto dispatch = [&](auto& yield)
{ {
DJKGeneratorVisitor vis(g, yield); DJKGeneratorVisitor vis(g, yield);
run_action<graph_tool::detail::all_graph_views, mpl::true_>() run_action<graph_tool::all_graph_views, mpl::true_>()
(g, std::bind(do_djk_search(), std::placeholders::_1, source, (g, std::bind(do_djk_search(), std::placeholders::_1, source,
std::placeholders::_2, dummy_property_map(), weight, std::placeholders::_2, dummy_property_map(), weight,
vis, DJKCmp(cmp), DJKCmb(cmb), vis, DJKCmp(cmp), DJKCmb(cmb),
...@@ -241,7 +241,7 @@ boost::python::object dijkstra_search_generator_fast(GraphInterface& g, ...@@ -241,7 +241,7 @@ boost::python::object dijkstra_search_generator_fast(GraphInterface& g,
auto dispatch = [&](auto& yield) auto dispatch = [&](auto& yield)
{ {
DJKGeneratorVisitor vis(g, yield); DJKGeneratorVisitor vis(g, yield);
run_action<graph_tool::detail::all_graph_views, mpl::true_>() run_action<graph_tool::all_graph_views, mpl::true_>()
(g, std::bind(do_djk_search_fast(), std::placeholders::_1, source, (g, std::bind(do_djk_search_fast(), std::placeholders::_1, source,
std::placeholders::_2, std::placeholders::_3, std::placeholders::_2, std::placeholders::_3,
vis, make_pair(zero, inf)), vis, make_pair(zero, inf)),
......
...@@ -33,7 +33,7 @@ using namespace graph_tool; ...@@ -33,7 +33,7 @@ using namespace graph_tool;
python::object do_label_components(GraphInterface& gi, boost::any prop) python::object do_label_components(GraphInterface& gi, boost::any prop)
{ {
vector<size_t> hist; vector<size_t> hist;
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(gi, std::bind(label_components(), std::placeholders::_1, (gi, std::bind(label_components(), std::placeholders::_1,
std::placeholders::_2, std::ref(hist)), std::placeholders::_2, std::ref(hist)),
writable_vertex_scalar_properties())(prop); writable_vertex_scalar_properties())(prop);
...@@ -57,7 +57,7 @@ do_label_biconnected_components(GraphInterface& gi, boost::any comp, ...@@ -57,7 +57,7 @@ do_label_biconnected_components(GraphInterface& gi, boost::any comp,
void do_label_out_component(GraphInterface& gi, size_t root, boost::any prop) void do_label_out_component(GraphInterface& gi, size_t root, boost::any prop)
{ {
run_action<graph_tool::detail::all_graph_views,mpl::true_>() run_action<graph_tool::all_graph_views,mpl::true_>()
(gi, std::bind(label_out_component(), std::placeholders::_1, std::placeholders::_2, root), (gi, std::bind(label_out_component(), std::placeholders::_1, std::placeholders::_2, root),
writable_vertex_scalar_properties())(prop); writable_vertex_scalar_properties())(prop);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment