Skip to content

Commit fcbd277

Browse files
committed
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
1 parent d130b18 commit fcbd277

5 files changed

Lines changed: 58 additions & 65 deletions

File tree

stan/math/fwd/fun/Eigen_NumTraits.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ struct ScalarBinaryOpTraits<std::complex<stan::math::fvar<T>>, double,
143143
* defined
144144
*/
145145
template <typename T, typename BinaryOp>
146-
struct ScalarBinaryOpTraits<int, std::complex<stan::math::fvar<T>>,
147-
BinaryOp> {
146+
struct ScalarBinaryOpTraits<int, std::complex<stan::math::fvar<T>>, BinaryOp> {
148147
using ReturnType = std::complex<stan::math::fvar<T>>;
149148
};
150149

@@ -157,8 +156,7 @@ struct ScalarBinaryOpTraits<int, std::complex<stan::math::fvar<T>>,
157156
* defined
158157
*/
159158
template <typename T, typename BinaryOp>
160-
struct ScalarBinaryOpTraits<std::complex<stan::math::fvar<T>>, int,
161-
BinaryOp> {
159+
struct ScalarBinaryOpTraits<std::complex<stan::math::fvar<T>>, int, BinaryOp> {
162160
using ReturnType = std::complex<stan::math::fvar<T>>;
163161
};
164162

stan/math/prim/fun/Eigen.hpp

Lines changed: 46 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -24,57 +24,56 @@
2424
#include <Eigen/QR>
2525
#include <Eigen/src/Core/NumTraits.h>
2626

27-
namespace Eigen {
27+
namespace Eigen {
2828

29-
/**
30-
* Traits specialization for Eigen binary operations for `int`
31-
* and `double` arguments.
32-
*
33-
* @tparam BinaryOp type of binary operation for which traits are
34-
* defined
35-
*/
36-
template <typename BinaryOp>
37-
struct ScalarBinaryOpTraits<int, double, BinaryOp> {
38-
using ReturnType = double;
39-
};
29+
/**
30+
* Traits specialization for Eigen binary operations for `int`
31+
* and `double` arguments.
32+
*
33+
* @tparam BinaryOp type of binary operation for which traits are
34+
* defined
35+
*/
36+
template <typename BinaryOp>
37+
struct ScalarBinaryOpTraits<int, double, BinaryOp> {
38+
using ReturnType = double;
39+
};
4040

41-
/**
42-
* Traits specialization for Eigen binary operations for `double`
43-
* and `int` arguments.
44-
*
45-
* @tparam BinaryOp type of binary operation for which traits are
46-
* defined
47-
*/
48-
template <typename BinaryOp>
49-
struct ScalarBinaryOpTraits<double, int, BinaryOp> {
50-
using ReturnType = double;
51-
};
41+
/**
42+
* Traits specialization for Eigen binary operations for `double`
43+
* and `int` arguments.
44+
*
45+
* @tparam BinaryOp type of binary operation for which traits are
46+
* defined
47+
*/
48+
template <typename BinaryOp>
49+
struct ScalarBinaryOpTraits<double, int, BinaryOp> {
50+
using ReturnType = double;
51+
};
5252

53-
/**
54-
* Traits specialization for Eigen binary operations for `int`
55-
* and complex `double` arguments.
56-
*
57-
* @tparam BinaryOp type of binary operation for which traits are
58-
* defined
59-
*/
60-
template <typename BinaryOp>
61-
struct ScalarBinaryOpTraits<int, std::complex<double>, BinaryOp> {
62-
using ReturnType = std::complex<double>;
63-
};
53+
/**
54+
* Traits specialization for Eigen binary operations for `int`
55+
* and complex `double` arguments.
56+
*
57+
* @tparam BinaryOp type of binary operation for which traits are
58+
* defined
59+
*/
60+
template <typename BinaryOp>
61+
struct ScalarBinaryOpTraits<int, std::complex<double>, BinaryOp> {
62+
using ReturnType = std::complex<double>;
63+
};
6464

65+
/**
66+
* Traits specialization for Eigen binary operations for complex
67+
* `double` and `int` arguments.
68+
*
69+
* @tparam BinaryOp type of binary operation for which traits are
70+
* defined
71+
*/
72+
template <typename BinaryOp>
73+
struct ScalarBinaryOpTraits<std::complex<double>, int, BinaryOp> {
74+
using ReturnType = std::complex<double>;
75+
};
6576

66-
/**
67-
* Traits specialization for Eigen binary operations for complex
68-
* `double` and `int` arguments.
69-
*
70-
* @tparam BinaryOp type of binary operation for which traits are
71-
* defined
72-
*/
73-
template <typename BinaryOp>
74-
struct ScalarBinaryOpTraits<std::complex<double>, int, BinaryOp> {
75-
using ReturnType = std::complex<double>;
76-
};
77-
78-
}
77+
} // namespace Eigen
7978

8079
#endif

stan/math/prim/fun/bessel_first_kind.hpp

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

6161
} // namespace math

stan/math/prim/fun/falling_factorial.hpp

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

8888
} // namespace math

test/unit/math/test_ad.hpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,10 +1331,8 @@ template <typename F, typename T1, typename T2,
13311331
require_st_integral<T1>* = nullptr>
13321332
void expect_ad_vectorized_binary_impl(const ad_tolerances& tols, const F& f,
13331333
const T1& x, const T2& y) {
1334-
auto f_bind = [&](const auto& x) {
1335-
return
1336-
[=](const auto& y) { return f(x, y); };
1337-
};
1334+
auto f_bind
1335+
= [&](const auto& x) { return [=](const auto& y) { return f(x, y); }; };
13381336
std::vector<T1> nest_x{x, x};
13391337
std::vector<T2> nest_y{y, y};
13401338
std::vector<std::vector<T1>> nest_nest_x{nest_x, nest_x};
@@ -1368,10 +1366,8 @@ template <typename F, typename T1, typename T2,
13681366
require_st_integral<T2>* = nullptr>
13691367
void expect_ad_vectorized_binary_impl(const ad_tolerances& tols, const F& f,
13701368
const T1& x, const T2& y) {
1371-
auto f_bind = [&](const auto& y) {
1372-
return
1373-
[=](const auto& x) { return f(x, y); };
1374-
};
1369+
auto f_bind
1370+
= [&](const auto& y) { return [=](const auto& x) { return f(x, y); }; };
13751371
std::vector<T1> nest_x{x, x};
13761372
std::vector<T2> nest_y{y, y};
13771373
std::vector<std::vector<T1>> nest_nest_x{nest_x, nest_x};

0 commit comments

Comments
 (0)