| 4808 | */ |
| 4809 | template <typename first_type_, typename second_type_, typename first_extractor_, typename second_extractor_> |
| 4810 | intersect_result_t intersect(first_type_ const &first, second_type_ const &second, |
| 4811 | first_extractor_ const &first_extractor, second_extractor_ const &second_extractor, |
| 4812 | std::uint64_t seed = 0) noexcept(false) { |
| 4813 | |
| 4814 | std::size_t const max_count = (std::min)(first.size(), second.size()); |
| 4815 | std::vector<sorted_idx_t> first_positions(max_count); |
| 4816 | std::vector<sorted_idx_t> second_positions(max_count); |
| 4817 | std::size_t count = 0; |
| 4818 | status_t status = try_intersect( // |
| 4819 | first, first_extractor, // |
| 4820 | second, second_extractor, // |
| 4821 | seed, &count, first_positions.data(), second_positions.data()); |
| 4822 | raise(status); |
| 4823 | first_positions.resize(count); |
| 4824 | second_positions.resize(count); |
| 4825 | return {std::move(first_positions), std::move(second_positions)}; |
| 4826 | } |
| 4827 | |
| 4828 | /** |
| 4829 | * @brief Locates identical elements in two arrays. |
searching dependent graphs…