From c040f44de366f386b270a999876e021d9c2326bb Mon Sep 17 00:00:00 2001 From: Tiago de Paula Peixoto Date: Sat, 22 Jun 2013 17:50:33 +0200 Subject: [PATCH] Return _really_ at most n_max subgraphs in subgraph_isomorphism() --- src/graph/topology/graph_subgraph_isomorphism.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graph/topology/graph_subgraph_isomorphism.hh b/src/graph/topology/graph_subgraph_isomorphism.hh index 24401095..8691dfdd 100644 --- a/src/graph/topology/graph_subgraph_isomorphism.hh +++ b/src/graph/topology/graph_subgraph_isomorphism.hh @@ -271,7 +271,8 @@ void find_mappings(const Graph1& sub, const Graph2& g, matrix_t& M0, iter != M_prime[ni].end(); ++iter) { F.push_back(std::make_pair(ni, *iter)); - FF.push_back(F); + if (max_n == 0 || FF.size() < max_n) + FF.push_back(F); F.pop_back(); } -- GitLab