sort¶
sort
function¶
template <typename T, size_t N>
vec<T, N> sort(const vec<T, N> &x)
Sort the elements in the vector in ascending order
Param x
input vector
Returns sorted vector
CHECK(sort(make_vector(1000, 1, 2, -10)) == make_vector(-10, 1, 2, 1000));
sortdesc
function¶
template <typename T, size_t N>
vec<T, N> sortdesc(const vec<T, N> &x)
Sort the elements in the vector in descending order
Param x
input vector
Returns sorted vector
CHECK(sort(make_vector(1000, 1, 2, -10)) == make_vector(1000, 2, 1, -10));
Auto-generated from sources, Revision 6aea976a464de59d522d0c629e64bf0c044e6777, https://github.com/kfrlib/kfr/blob/6aea976a464de59d522d0c629e64bf0c044e6777/include/kfr/