1#ifndef STAN_MATH_PRIM_FUN_MAX_HPP
2#define STAN_MATH_PRIM_FUN_MAX_HPP
24template <
typename T1,
typename T2, require_all_arithmetic_t<T1, T2>* =
nullptr>
26 return std::max(x, y);
41template <
typename T, require_container_t<T>* =
nullptr>
45 }
else if (m.size() == 0) {
49 m, [](
const auto& x) {
return x.maxCoeff(); });
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
static constexpr double NEGATIVE_INFTY
Negative infinity.
auto max(T1 x, T2 y)
Returns the maximum value of the two specified scalar arguments.
void check_nonzero_size(const char *function, const char *name, const T_y &y)
Check if the specified matrix/vector is of non-zero size.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...