Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ set_approx_order()

template<typename EigMat1 , typename EigMat2 , require_all_eigen_t< EigMat1, EigMat2 > * = nullptr, require_all_st_same< double, EigMat1, EigMat2 > * = nullptr>
void stan::math::matrix_exp_action_handler::set_approx_order ( const EigMat1 &  mat,
const EigMat2 &  b,
const double &  t,
int &  m,
int &  s 
)
inline

Approximation is based on parameter "m" and "s", proposed in CODE FRAGMENT 3.1 of the reference.

The parameters depend on matrix A, as well as limits "m_max" & "p_max", defined in table 3.1 and eq. 3.11, respectively. Ideally one can choose "m_max" and "p_max" to suite the specific computing precision needs, here we just use the one suggested in the paper (paragraph between eq. 3.11 & eq. 3.12).

Parameters
[in]matmatrix A
[in]bmatrix B
[in]tdouble t in exp(A*t)*B
[out]mint parameter m; m >= 0, m < _m_max
[out]sint parameter s; s >= 1

Definition at line 159 of file matrix_exp_action_handler.hpp.