1 #ifndef STAN_MATH_REV_MAT_FUN_QUAD_FORM_SYM_HPP 2 #define STAN_MATH_REV_MAT_FUN_QUAD_FORM_SYM_HPP 11 #include <type_traits> 16 template <
typename Ta,
int Ra,
int Ca,
typename Tb,
int Rb,
int Cb>
17 inline typename std::enable_if<std::is_same<Ta, var>::value
18 || std::is_same<Tb, var>::value,
19 Eigen::Matrix<var, Cb, Cb> >::type
21 const Eigen::Matrix<Tb, Rb, Cb>& B) {
29 return baseVari->
impl_->C_;
32 template <
typename Ta,
int Ra,
int Ca,
typename Tb,
int Rb>
33 inline typename std::enable_if<
34 std::is_same<Ta, var>::value || std::is_same<Tb, var>::value,
var>::type
36 const Eigen::Matrix<Tb, Rb, 1>& B) {
44 return baseVari->
impl_->C_(0, 0);
void check_square(const char *function, const char *name, const matrix_cl &y)
Check if the matrix_cl is square.
Independent (input) and dependent (output) variables for gradients.
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.
Eigen::Matrix< fvar< T >, CB, CB > quad_form_sym(const Eigen::Matrix< fvar< T >, RA, CA > &A, const Eigen::Matrix< double, RB, CB > &B)
void check_symmetric(const char *function, const char *name, const matrix_cl &y)
Check if the matrix_cl is symmetric.