diff --git a/stan/math/prim/fun/acosh.hpp b/stan/math/prim/fun/acosh.hpp index 4cdc2930571..5580e9e1e73 100644 --- a/stan/math/prim/fun/acosh.hpp +++ b/stan/math/prim/fun/acosh.hpp @@ -82,6 +82,16 @@ inline auto acosh(const T& x) { return apply_scalar_unary::apply(x); } +/** + * Return the elementwise application of acosh() to + * specified argument container. The return type promotes the + * underlying scalar argument type to double if it is an integer, + * and otherwise is the argument type. + * + * @tparam T type of container + * @param x container + * @return Elementwise acosh of members of container. + */ template * = nullptr> inline auto acosh(const Container& x) { diff --git a/stan/math/prim/fun/asinh.hpp b/stan/math/prim/fun/asinh.hpp index ebb5bff9282..ab72065efae 100644 --- a/stan/math/prim/fun/asinh.hpp +++ b/stan/math/prim/fun/asinh.hpp @@ -70,6 +70,14 @@ inline auto asinh(const T& x) { return apply_scalar_unary::apply(x); } +/** + * Returns the elementwise `asinh()` of the input, + * which may be a scalar or any Stan container of numeric scalars. + * + * @tparam T type of container + * @param x container + * @return Inverse hyperbolic sine of each value in the container. + */ template * = nullptr> inline auto asinh(const Container& x) { diff --git a/stan/math/prim/fun/atanh.hpp b/stan/math/prim/fun/atanh.hpp index aeb88d2203a..fdf6c4df9b5 100644 --- a/stan/math/prim/fun/atanh.hpp +++ b/stan/math/prim/fun/atanh.hpp @@ -81,6 +81,16 @@ inline auto atanh(const T& x) { return apply_scalar_unary::apply(x); } +/** + * Return the elementwise application of atanh() to + * specified argument container. The return type promotes the + * underlying scalar argument type to double if it is an integer, + * and otherwise is the argument type. + * + * @tparam T type of container + * @param x container + * @return Elementwise atanh of members of container. + */ template * = nullptr> inline auto atanh(const Container& x) { diff --git a/stan/math/prim/fun/inv_cloglog.hpp b/stan/math/prim/fun/inv_cloglog.hpp index 529990bd974..f197d49c24e 100644 --- a/stan/math/prim/fun/inv_cloglog.hpp +++ b/stan/math/prim/fun/inv_cloglog.hpp @@ -50,6 +50,19 @@ inline auto inv_cloglog(const T x) { return 1. - std::exp(-std::exp(x)); } +/** + * The inverse complementary log-log function. + * + * The function is defined by + * + * inv_cloglog(x) = 1 - exp(-exp(x)). + * + * This function can be used to implement the inverse link + * function for complementary-log-log regression. + * + * @param x Argument. + * @return Inverse complementary log-log of the argument. + */ template * = nullptr> inline auto inv_cloglog(const T& x) { return 1. - exp(-exp(x)); diff --git a/stan/math/prim/meta/is_container.hpp b/stan/math/prim/meta/is_container.hpp index 899ca961b83..25479694f6b 100644 --- a/stan/math/prim/meta/is_container.hpp +++ b/stan/math/prim/meta/is_container.hpp @@ -91,12 +91,15 @@ template