Skip to content

Commit 79a929a

Browse files
committed
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
1 parent 2c71c06 commit 79a929a

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

stan/math/prim/fun/inv_logit.hpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,27 +81,31 @@ struct inv_logit_fun {
8181
* @return Inverse logit applied to each value in x.
8282
*/
8383
template <typename Container, require_ad_container_t<Container>* = nullptr,
84-
require_all_not_nonscalar_prim_or_rev_kernel_expression_t<Container>* = nullptr,
85-
require_not_rev_matrix_t<Container>* = nullptr>
84+
require_all_not_nonscalar_prim_or_rev_kernel_expression_t<
85+
Container>* = nullptr,
86+
require_not_rev_matrix_t<Container>* = nullptr>
8687
inline auto inv_logit(Container&& x) {
87-
return apply_scalar_unary<inv_logit_fun, Container>::apply(std::forward<Container>(x));
88+
return apply_scalar_unary<inv_logit_fun, Container>::apply(
89+
std::forward<Container>(x));
8890
}
8991

9092
/**
9193
* Vectorized version of inv_logit() for Eigen types.
9294
*
93-
* @tparam T A type of either `std::vector` whose inner type inherits from `Eigen::DenseBase` or a
94-
* type that directly inherits from `Eigen::DenseBase`. The inner scalar type must not have a
95-
* `var` scalar type.
95+
* @tparam T A type of either `std::vector` whose inner type inherits from
96+
* `Eigen::DenseBase` or a type that directly inherits from `Eigen::DenseBase`.
97+
* The inner scalar type must not have a `var` scalar type.
9698
* @param x Eigen expression
9799
* @return Inverse logit applied to each value in x.
98100
*/
99101
template <typename Container,
100102
require_container_bt<std::is_arithmetic, Container>* = nullptr,
101-
require_all_not_nonscalar_prim_or_rev_kernel_expression_t<Container>* = nullptr>
103+
require_all_not_nonscalar_prim_or_rev_kernel_expression_t<
104+
Container>* = nullptr>
102105
inline auto inv_logit(Container&& x) {
103106
return apply_vector_unary<Container>::apply(
104-
std::forward<Container>(x), [](const auto& v) { return v.array().logistic(); });
107+
std::forward<Container>(x),
108+
[](const auto& v) { return v.array().logistic(); });
105109
}
106110
} // namespace math
107111
} // namespace stan

stan/math/prim/functor/apply_scalar_unary.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ struct apply_scalar_unary<F, T, require_floating_point_t<T>> {
8383
/**
8484
* The return type, double.
8585
*/
86-
using return_t = std::decay_t<decltype(F::fun(std::declval<std::decay_t<T>>()))>;
86+
using return_t
87+
= std::decay_t<decltype(F::fun(std::declval<std::decay_t<T>>()))>;
8788

8889
/**
8990
* Apply the function specified by F to the specified argument.
@@ -118,7 +119,8 @@ struct apply_scalar_unary<F, T, require_complex_t<T>> {
118119
/**
119120
* The return type
120121
*/
121-
using return_t = std::decay_t<decltype(F::fun(std::declval<std::decay_t<T>>()))>;
122+
using return_t
123+
= std::decay_t<decltype(F::fun(std::declval<std::decay_t<T>>()))>;
122124
};
123125

124126
/**
@@ -162,8 +164,8 @@ struct apply_scalar_unary<F, T, require_std_vector_t<T>> {
162164
* Return type, which is calculated recursively as a standard
163165
* vector of the return type of the contained type T.
164166
*/
165-
using return_t = typename std::vector<
166-
plain_type_t<typename apply_scalar_unary<F, value_type_t<std::decay_t<T>>>::return_t>>;
167+
using return_t = typename std::vector<plain_type_t<
168+
typename apply_scalar_unary<F, value_type_t<std::decay_t<T>>>::return_t>>;
167169

168170
/**
169171
* Apply the function specified by F elementwise to the

0 commit comments

Comments
 (0)