1 #ifndef STAN_MATH_PRIM_FUN_SORT_INDICES_DESC_HPP 2 #define STAN_MATH_PRIM_FUN_SORT_INDICES_DESC_HPP 3 4 #include <stan/math/prim/meta.hpp> 5 #include <stan/math/prim/fun/Eigen.hpp> 6 #include <stan/math/prim/fun/sort_indices.hpp> 7 #include <algorithm> 8 #include <vector> 9 10 namespace stan { 11 namespace math { 12 13 /** 14 * Return a sorted copy of the argument container in ascending order. 15 * 16 * @tparam C type of container 17 * @param xs Container to sort 18 * @return sorted version of container 19 */ 20 template <typename C> sort_indices_desc(const C & xs)21std::vector<int> sort_indices_desc(const C& xs) { 22 return sort_indices<false>(xs); 23 } 24 25 } // namespace math 26 } // namespace stan 27 28 #endif 29