1#ifndef STAN_MATH_PRIM_FUNCTOR_INTEGRATE_ODE_RK45_HPP
2#define STAN_MATH_PRIM_FUNCTOR_INTEGRATE_ODE_RK45_HPP
16template <
typename F,
typename T_y0,
typename T_param,
typename T_t0,
19 const F& f,
const std::vector<T_y0>& y0,
const T_t0& t0,
20 const std::vector<T_ts>& ts,
const std::vector<T_param>& theta,
21 const std::vector<double>& x,
const std::vector<int>& x_int,
22 std::ostream* msgs =
nullptr,
double relative_tolerance = 1
e-6,
23 double absolute_tolerance = 1
e-6,
int max_num_steps = 1e6) {
26 ts, relative_tolerance, absolute_tolerance,
27 max_num_steps, msgs, theta, x, x_int);
29 std::vector<std::vector<return_type_t<T_y0, T_param, T_t0, T_ts>>>
31 y_converted.reserve(y.size());
32 for (
size_t i = 0; i < y.size(); ++i)
auto to_vector(T_x &&x)
Returns input matrix reshaped into a vector.
auto to_array_1d(T_x &&x)
Returns input matrix reshaped into a vector.
std::vector< Eigen::Matrix< stan::return_type_t< T_y0, T_t0, T_ts, Args... >, Eigen::Dynamic, 1 > > ode_rk45_tol_impl(const char *function_name, const F &f, const T_y0 &y0_arg, T_t0 t0, const std::vector< T_ts > &ts, double relative_tolerance, double absolute_tolerance, long int max_num_steps, std::ostream *msgs, const Args &... args)
Solve the ODE initial value problem y' = f(t, y), y(t0) = y0 at a set of times, { t1,...
static constexpr double e()
Return the base of the natural logarithm.
auto integrate_ode_rk45(const F &f, const std::vector< T_y0 > &y0, const T_t0 &t0, const std::vector< T_ts > &ts, const std::vector< T_param > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs=nullptr, double relative_tolerance=1e-6, double absolute_tolerance=1e-6, int max_num_steps=1e6)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Wrap a functor designed for use with integrate_ode_bdf, integrate_ode_rk45, and integrate_ode_adams t...