55 std::unordered_map<Id_, Index_> ref_found;
56 for (Index_ i = 0; i < ref_nrow; ++i) {
57 auto current = ref_id[i];
58 auto tfIt = ref_found.find(current);
59 if (tfIt == ref_found.end()) {
60 ref_found[current] = i;
65 for (Index_ i = 0; i < test_nrow; ++i) {
66 auto current = test_id[i];
67 auto tfIt = ref_found.find(current);
68 if (tfIt != ref_found.end()) {
69 output.emplace_back(i, tfIt->second);
70 ref_found.erase(tfIt);
Intersection< Index_ > intersect_genes(Index_ test_nrow, const Id_ *test_id, Index_ ref_nrow, const Id_ *ref_id)
Definition Intersection.hpp:54