1 #ifndef STAN_MATH_PRIM_MAT_FUN_MAX_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_MAX_HPP
22 inline int max(
const std::vector<int>& x) {
25 for (
size_t i = 1; i < x.size(); ++i)
39 inline T
max(
const std::vector<T>& x) {
41 return -std::numeric_limits<T>::infinity();
43 for (
size_t i = 1; i < x.size(); ++i)
55 template <
typename T,
int R,
int C>
56 inline T
max(
const Eigen::Matrix<T, R, C>& m) {
58 return -std::numeric_limits<double>::infinity();
bool check_nonzero_size(const char *function, const char *name, const T_y &y)
Return true if the specified matrix/vector is of non-zero size.
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.