Skip to content

Commit a3f438b

Browse files
committed
Merge branch 'feature/parameter-pack-odes' of https://github.com/stan-dev/math into feature/parameter-pack-odes
2 parents 1908f1c + 0d2e975 commit a3f438b

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

test/unit/math/rev/functor/cvodes_utils_test.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
struct Inverse {
88
template <typename T0, typename T_y>
9-
inline Eigen::Matrix<stan::return_type_t<T_y>, Eigen::Dynamic, 1>
10-
operator()(const T0& t, const Eigen::Matrix<T_y, Eigen::Dynamic, 1>& y, std::ostream* msgs) const {
9+
inline Eigen::Matrix<stan::return_type_t<T_y>, Eigen::Dynamic, 1> operator()(
10+
const T0& t, const Eigen::Matrix<T_y, Eigen::Dynamic, 1>& y,
11+
std::ostream* msgs) const {
1112
Eigen::Matrix<T_y, Eigen::Dynamic, 1> out(1);
1213
out(0) = 1.0 / (y(0) - 1.0);
1314
return out;
@@ -19,8 +20,10 @@ TEST(StanMath, cvodes_error_handler) {
1920
int t0 = 0;
2021
std::vector<double> ts = {0.45, 1.1};
2122

22-
std::string msg = "CVODES: CVode Internal t = 0 and h = 0 are such that t + h = t on the next step";
23-
23+
std::string msg
24+
= "CVODES: CVode Internal t = 0 and h = 0 are such that t + h = t on the "
25+
"next step";
26+
2427
EXPECT_THROW_MSG(stan::math::ode_bdf(Inverse(), y0, t0, ts, nullptr),
25-
std::domain_error, msg);
28+
std::domain_error, msg);
2629
}

test/unit/math/rev/functor/integrate_ode_cvodes_grad_rev_test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ class sho_functor {
3636
public:
3737
template <typename T0, typename T1, typename T2>
3838
inline std::vector<stan::return_type_t<T1, T2>> operator()(
39-
const T0& t_in, // time
40-
const std::vector<T1>& y_in, // state
41-
const std::vector<T2>& theta, // parameters
42-
const std::vector<double>& x, // double data
43-
const std::vector<int>& x_int, // integer data
44-
std::ostream* msgs) const { // error stream
39+
const T0& t_in, // time
40+
const std::vector<T1>& y_in, // state
41+
const std::vector<T2>& theta, // parameters
42+
const std::vector<double>& x, // double data
43+
const std::vector<int>& x_int, // integer data
44+
std::ostream* msgs) const { // error stream
4545
if (y_in.size() != 2)
4646
throw std::domain_error("Functor called with inconsistent state");
4747

0 commit comments

Comments
 (0)