| Stan Math Library 2.12.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

sort_asc.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_SORT_ASC_HPP
2 #define STAN_MATH_PRIM_ARR_FUN_SORT_ASC_HPP
3
4 #include <stan/math/prim/scal/err/check_not_nan.hpp>
5 #include <algorithm>
6 #include <vector>
7
8 namespace stan {
9 namespace math {
10
19 template <typename T>
20 inline std::vector<T> sort_asc(std::vector<T> xs) {
21 check_not_nan("sort_asc", "container argument", xs);
22 std::sort(xs.begin(), xs.end());
23 return xs;
24 }
25
26 }
27 }
28 #endif
check_not_nan.hpp
stan::math::check_not_nan
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
Definition: check_not_nan.hpp:60
stan
Definition: log_sum_exp.hpp:8
stan::math::sort_asc
std::vector< T > sort_asc(std::vector< T > xs)
Return the specified standard vector in ascending order.
Definition: sort_asc.hpp:20

[ Stan Home Page ] © 2011–2016, Stan Development Team.