Stan Math Library  2.20.0
reverse mode automatic differentiation
scale_matrix_exp_multiply.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SCALE_MATRIX_EXP_MULTIPLY_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_SCALE_MATRIX_EXP_MULTIPLY_HPP
3 
4 #include <stan/math/prim/mat.hpp>
6 
7 namespace stan {
8 namespace math {
9 
19 template <int Cb>
20 inline Eigen::Matrix<double, -1, Cb> scale_matrix_exp_multiply(
21  const double& t, const Eigen::MatrixXd& A,
22  const Eigen::Matrix<double, -1, Cb>& B) {
23  check_nonzero_size("scale_matrix_exp_multiply", "input matrix", A);
24  check_nonzero_size("scale_matrix_exp_multiply", "input matrix", B);
25  check_multiplicable("scale_matrix_exp_multiply", "A", A, "B", B);
26  check_square("scale_matrix_exp_multiply", "input matrix", A);
27  return matrix_exp_action_handler().action(A, B, t);
28 }
29 
30 } // namespace math
31 } // namespace stan
32 #endif
void check_nonzero_size(const char *function, const char *name, const T_y &y)
Check if the specified matrix/vector is of non-zero size.
Eigen::MatrixXd action(const Eigen::MatrixXd &mat, const Eigen::MatrixXd &b, const double &t=1.0)
void check_square(const char *function, const char *name, const matrix_cl &y)
Check if the matrix_cl is square.
Eigen::Matrix< double, -1, Cb > scale_matrix_exp_multiply(const double &t, const Eigen::MatrixXd &A, const Eigen::Matrix< double, -1, Cb > &B)
Return product of exp(At) and B, where A is a NxN double matrix, B is a NxCb double matrix...
void check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Check if the matrices can be multiplied.

     [ Stan Home Page ] © 2011–2018, Stan Development Team.