1 #ifndef STAN_MATH_PRIM_ARR_FUNCTOR_COUPLED_ODE_SYSTEM_HPP 2 #define STAN_MATH_PRIM_ARR_FUNCTOR_COUPLED_ODE_SYSTEM_HPP 28 template <
typename F,
typename T1,
typename T2>
50 const std::vector<double>&
x_;
70 const std::vector<double>& theta,
71 const std::vector<double>& x,
72 const std::vector<int>& x_int, std::ostream* msgs)
95 void operator()(
const std::vector<double>& y, std::vector<double>& dy_dt,
97 dy_dt = f_(t, y, theta_dbl_, x_, x_int_, msgs_);
107 int size()
const {
return size_; }
116 std::vector<double> state(size_, 0.0);
117 for (
size_t n = 0; n < N_; n++)
118 state[n] = y0_dbl_[n];
const std::vector< int > & x_int_
const std::vector< double > & theta_dbl_
coupled_ode_system(const F &f, const std::vector< double > &y0, const std::vector< double > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs)
Construct the coupled ode system from the base system function, initial state of the base system...
std::vector< double > initial_state() const
Returns the initial state of the coupled system.
void operator()(const std::vector< double > &y, std::vector< double > &dy_dt, double t) const
Calculates the derivative of the coupled ode system with respect to time.
void check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Check if the provided sizes match.
const std::vector< double > & y0_dbl_
int size() const
Returns the size of the coupled system.
const std::vector< double > & x_
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
The coupled_ode_system represents the coupled ode system, which is the base ode and the sensitivities...