1 #ifndef STAN__MATH__MATRIX__MAX_HPP
2 #define STAN__MATH__MATRIX__MAX_HPP
19 inline int max(
const std::vector<int>& x) {
21 throw std::domain_error(
"error: cannot take max of empty int vector");
23 for (
size_t i = 1; i < x.size(); ++i)
37 inline T
max(
const std::vector<T>& x) {
39 return -std::numeric_limits<T>::infinity();
41 for (
size_t i = 1; i < x.size(); ++i)
53 template <
typename T,
int R,
int C>
54 inline T
max(
const Eigen::Matrix<T,R,C>& m) {
56 return -std::numeric_limits<double>::infinity();
double max(const double a, const double b)