1 #ifndef STAN_MATH_PRIM_MAT_FUN_MAX_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_MAX_HPP
21 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();
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.