Skip to content

Commit 3703953

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fix/jachymb-inv_logistic
2 parents 5ec57f7 + ad31032 commit 3703953

40 files changed

Lines changed: 166 additions & 157 deletions

stan/math/fwd/fun/pow.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr,
7575
require_any_fvar_t<base_type_t<T1>, base_type_t<T2>>* = nullptr>
7676
inline auto pow(const T1& a, const T2& b) {
7777
return apply_scalar_binary(
78-
a, b, [](const auto& c, const auto& d) { return stan::math::pow(c, d); });
78+
[](const auto& c, const auto& d) { return stan::math::pow(c, d); }, a, b);
7979
}
8080

8181
} // namespace math

stan/math/fwd/functor/finite_diff.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ template <typename FuncTangent, typename InputArg,
4545
require_st_fvar<InputArg>* = nullptr>
4646
inline auto aggregate_tangent(const FuncTangent& tangent, const InputArg& arg) {
4747
return sum(apply_scalar_binary(
48-
tangent, arg, [](const auto& x, const auto& y) { return x * y.d_; }));
48+
[](const auto& x, const auto& y) { return x * y.d_; }, tangent, arg));
4949
}
5050
} // namespace internal
5151

stan/math/prim/fun/atan2.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr,
3838
require_all_not_var_matrix_t<T1, T2>* = nullptr>
3939
inline auto atan2(const T1& a, const T2& b) {
4040
return apply_scalar_binary(
41-
a, b, [](const auto& c, const auto& d) { return atan2(c, d); });
41+
[](const auto& c, const auto& d) { return atan2(c, d); }, a, b);
4242
}
4343

4444
} // namespace math

stan/math/prim/fun/bessel_first_kind.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ inline T2 bessel_first_kind(int v, const T2 z) {
5454
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr,
5555
require_not_var_matrix_t<T2>* = nullptr>
5656
inline auto bessel_first_kind(const T1& a, const T2& b) {
57-
return apply_scalar_binary(a, b, [&](const auto& c, const auto& d) {
58-
return bessel_first_kind(c, d);
59-
});
57+
return apply_scalar_binary(
58+
[](const auto& c, const auto& d) { return bessel_first_kind(c, d); }, a,
59+
b);
6060
}
6161

6262
} // namespace math

stan/math/prim/fun/bessel_second_kind.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ inline T2 bessel_second_kind(int v, const T2 z) {
5454
*/
5555
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr>
5656
inline auto bessel_second_kind(const T1& a, const T2& b) {
57-
return apply_scalar_binary(a, b, [&](const auto& c, const auto& d) {
58-
return bessel_second_kind(c, d);
59-
});
57+
return apply_scalar_binary(
58+
[](const auto& c, const auto& d) { return bessel_second_kind(c, d); }, a,
59+
b);
6060
}
6161

6262
} // namespace math

stan/math/prim/fun/beta.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr,
6969
require_all_not_var_matrix_t<T1, T2>* = nullptr>
7070
inline auto beta(const T1& a, const T2& b) {
7171
return apply_scalar_binary(
72-
a, b, [](const auto& c, const auto& d) { return beta(c, d); });
72+
[](const auto& c, const auto& d) { return beta(c, d); }, a, b);
7373
}
7474

7575
} // namespace math

stan/math/prim/fun/binary_log_loss.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ inline T binary_log_loss(int y, const T& y_hat) {
4545
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr,
4646
require_not_var_matrix_t<T2>* = nullptr>
4747
inline auto binary_log_loss(const T1& a, const T2& b) {
48-
return apply_scalar_binary(a, b, [&](const auto& c, const auto& d) {
49-
return binary_log_loss(c, d);
50-
});
48+
return apply_scalar_binary(
49+
[](const auto& c, const auto& d) { return binary_log_loss(c, d); }, a, b);
5150
}
5251

5352
} // namespace math

stan/math/prim/fun/binomial_coefficient_log.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ inline return_type_t<T_n, T_k> binomial_coefficient_log(const T_n n,
162162
*/
163163
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr>
164164
inline auto binomial_coefficient_log(const T1& a, const T2& b) {
165-
return apply_scalar_binary(a, b, [&](const auto& c, const auto& d) {
166-
return binomial_coefficient_log(c, d);
167-
});
165+
return apply_scalar_binary(
166+
[](const auto& c, const auto& d) {
167+
return binomial_coefficient_log(c, d);
168+
},
169+
a, b);
168170
}
169171

170172
} // namespace math

stan/math/prim/fun/choose.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ inline int choose(int n, int k) {
5151
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr>
5252
inline auto choose(const T1& a, const T2& b) {
5353
return apply_scalar_binary(
54-
a, b, [&](const auto& c, const auto& d) { return choose(c, d); });
54+
[](const auto& c, const auto& d) { return choose(c, d); }, a, b);
5555
}
5656

5757
} // namespace math

stan/math/prim/fun/falling_factorial.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ inline return_type_t<T> falling_factorial(const T& x, int n) {
8181
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr,
8282
require_all_not_var_matrix_t<T1, T2>* = nullptr>
8383
inline auto falling_factorial(const T1& a, const T2& b) {
84-
return apply_scalar_binary(a, b, [&](const auto& c, const auto& d) {
85-
return falling_factorial(c, d);
86-
});
84+
return apply_scalar_binary(
85+
[](const auto& c, const auto& d) { return falling_factorial(c, d); }, a,
86+
b);
8787
}
8888

8989
} // namespace math

0 commit comments

Comments
 (0)