Template Function navtk::utils::find_duplicates(const std::vector<T>&)
Defined in File sortable_vectors.hpp
Function Documentation
-
template<typename T>
std::vector<Size> navtk::utils::find_duplicates(const std::vector<T> &data) Generate a vector of indices marking consecutive duplicates.
- Template Parameters
T – Data type stored in vector; must have == operator defined.
- Parameters
data – The data to check.
- Returns
A vector of indices where the index
kwill be included ifdata[k-1] == data[k]. Return vector will be empty of no duplicates are found.