After stan-dev/math#2644, we will need to support DAE signatures in the language. Corresponding to the variadic math functions
template <typename F, typename T_yy, typename T_yp, typename... T_Args,
require_all_eigen_col_vector_t<T_yy, T_yp>* = nullptr>
std::vector<Eigen::Matrix<stan::return_type_t<T_yy, T_yp, T_Args...>, -1, 1>>
dae_tol(const F& f, const T_yy& yy0, const T_yp& yp0, double t0,
const std::vector<double>& ts, double rtol, double atol,
int64_t max_num_steps, std::ostream* msgs, const T_Args&... args) {
return dae_tol_impl("dae_tol", f, yy0, yp0, t0, ts, rtol, atol, max_num_steps,
msgs, args...);
}
and
template <typename F, typename T_yy, typename T_yp, typename... T_Args,
require_all_eigen_col_vector_t<T_yy, T_yp>* = nullptr>
std::vector<Eigen::Matrix<stan::return_type_t<T_yy, T_yp, T_Args...>, -1, 1>>
dae(const F& f, const T_yy& yy0, const T_yp& yp0, double t0,
const std::vector<double>& ts, std::ostream* msgs, const T_Args&... args) {
return dae_tol_impl("dae", f, yy0, yp0, t0, ts, 1.e-10, 1.e-10, 1e8, msgs,
args...);
the stan function signature would be
array[] vector = dae_tol(dae_function, vector yy0, vector yp0, real t0, array[] real ts,
real rel_tol, real abs_tol, int max_num_steps, args...);
array[] vector = dae(dae_function, vector yy0, vector yp0, real t0, array[] real ts, args...);
The DAE function signature should be
vector f(real t, vector yy, vector yp, args...);
After stan-dev/math#2644, we will need to support DAE signatures in the language. Corresponding to the variadic math functions
and
the stan function signature would be
The DAE function signature should be