Skip to content
Snippets Groups Projects
Commit 568512e6 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fix bug in CompareMatchingResultSize

parent d5ff51ee
No related branches found
No related tags found
2 merge requests!152Update Aidge export to take a graph view has an argument instead of a...,!138Alternative graph matching
Pipeline #46098 passed
......@@ -197,12 +197,19 @@ private:
struct CompareMatchingResultSize {
bool operator()(const MatchingResult& lhs, const MatchingResult& rhs) const {
// Some matches size could be the same
if (lhs.graph->getNodes().size() == rhs.graph->getNodes().size()) {
// In this case, use rootNode which is garanteed to be different!
return lhs.graph->rootNode() < rhs.graph->rootNode();
}
return lhs.graph->getNodes().size() > rhs.graph->getNodes().size();
}
};
};
inline bool operator<(const Aidge::SinglePassGraphMatching::MatchingResult& lhs, const Aidge::SinglePassGraphMatching::MatchingResult& rhs) {
// Matches rootNode are garanteed to be different!
return lhs.graph->rootNode() < rhs.graph->rootNode();
}
} // namespace Aidge
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment