Specialized Template Function navtk::utils::find_duplicates(const std::vector<std::pair<double, double>>&)

Function Documentation

template<>
std::vector<Size> navtk::utils::find_duplicates(const std::vector<std::pair<double, double>> &data)

Generate a vector of indices marking consecutive duplicates.

Template specialization for pairs, where equivalence is based only on the equality of the ‘first’ members of consecutive elements.

Parameters

data – The data to check.

Returns

A vector of indices where the index k will be included if data[k-1] == data[k]. Return vector will be empty if no duplicates are found.