1 #ifndef __MINLCA_UTILS_UTILS_HH
2 #define __MINLCA_UTILS_UTILS_HH
25 inline int posMax(
const std::vector<T> &v)
27 return std::distance(v.begin(), std::max_element(v.begin(), v.end()));
33 inline std::vector<int>
nonNegative(
const std::vector<int> &v)
36 std::vector<int> result;
38 for (
int i = 0; i < n; ++i)
std::vector< int > nonNegative(const std::vector< int > &v)
Vector of non-negative indices.
Default namespace Default namespace for MinLCA algorithms.
int posMax(const std::vector< T > &v)
Index of the maximum position.