Commit dc26d472 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

subgraph_isomorphism(): fix bug when subgraph is filtered

This fixes issue #715
parent c80b9af0
Pipeline #941 failed with stage
in 42 minutes and 58 seconds
......@@ -152,7 +152,8 @@ libgraph_tool_core_la_workaround_HEADERS = \
src/boost-workaround/boost/graph/overloading.hpp \
src/boost-workaround/boost/graph/push_relabel_max_flow.hpp \
src/boost-workaround/boost/graph/copy_alt.hpp \
src/boost-workaround/boost/graph/stoer_wagner_min_cut.hpp
src/boost-workaround/boost/graph/stoer_wagner_min_cut.hpp \
src/boost-workaround/boost/graph/vf2_sub_graph_iso.hpp
libgraph_tool_core_la_pcg_cppdir = $(MOD_DIR)/include/pcg-cpp
libgraph_tool_core_la_pcg_cpp_HEADERS = \
src/pcg-cpp/include/pcg_extras.hpp \
......
This diff is collapsed.
......@@ -228,19 +228,18 @@ subgraph_isomorphism(GraphInterface& gi1, GraphInterface& gi2,
if (!generator)
{
gt_dispatch<>()
(
[&](auto&& graph, auto&& a2, auto&& a3, auto&& a4)
{
return get_subgraphs()
(std::forward<decltype(graph)>(graph),
std::forward<decltype(a2)>(a2),
std::forward<decltype(a3)>(a3), vertex_label2,
std::forward<decltype(a4)>(a4), edge_label2, vmaps,
max_n, induced, iso, ListMatch());
},
all_graph_views(), all_graph_views(), vertex_props_t(),
edge_props_t())(gi1.get_graph_view(), gi2.get_graph_view(),
vertex_label1, edge_label1);
([&](auto&& graph, auto&& a2, auto&& a3, auto&& a4)
{
return get_subgraphs()
(std::forward<decltype(graph)>(graph),
std::forward<decltype(a2)>(a2),
std::forward<decltype(a3)>(a3), vertex_label2,
std::forward<decltype(a4)>(a4), edge_label2, vmaps,
max_n, induced, iso, ListMatch());
},
all_graph_views(), all_graph_views(), vertex_props_t(),
edge_props_t())(gi1.get_graph_view(), gi2.get_graph_view(),
vertex_label1, edge_label1);
python::list vmapping;
for (auto& vmap: vmaps)
......@@ -263,8 +262,8 @@ subgraph_isomorphism(GraphInterface& gi1, GraphInterface& gi2,
std::forward<decltype(a4)>(a4), edge_label2, vmaps,
max_n, induced, iso, GenMatch(yield));
},
all_graph_views(), vertex_props_t(), edge_props_t())(
gi2.get_graph_view(), vertex_label1, edge_label1);
all_graph_views(), vertex_props_t(), edge_props_t())
(gi2.get_graph_view(), vertex_label1, edge_label1);
};
CoroGenerator gen(dispatch);
return boost::python::object(gen);
......
Supports Markdown
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