1#ifndef STAN_MATH_PRIM_FUN_SORT_DESC_HPP
2#define STAN_MATH_PRIM_FUN_SORT_DESC_HPP
25 std::sort(xs.begin(), xs.end(), std::greater<T>());
38template <
typename EigVec, require_eigen_vector_t<EigVec>* =
nullptr>
42 std::sort(x.data(), x.data() + x.size(),
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
auto sort_desc(T &&input)
Sort the (row)vector in ascending order.
void check_not_nan(const char *function, const char *name, const T_y &y)
Check if y is not NaN.
typename plain_type< T >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...