Template Function navtk::utils::pair_and_time_sort_data
Defined in File sortable_vectors.hpp
Function Documentation
-
template<typename T>
std::vector<std::pair<double, T>> navtk::utils::pair_and_time_sort_data(const std::vector<double> &tags, const std::vector<T> &data) Zip a pair of vectors into a vector of paired elements, and sort according to the first elements.
- Template Parameters
T – Data type in ‘second’ members.
- Parameters
tags – Data to sort by, size N.
data – Data to be zipped with tags, must be at least size N. If more than N elements are present they are ignored.
- Returns
A sorted vector of `{tags[k], data[k]}.