1#ifndef STAN_MATH_FWD_FUN_TCROSSPROD_HPP
2#define STAN_MATH_FWD_FUN_TCROSSPROD_HPP
13template <
typename EigMat, require_eigen_vt<is_fvar, EigMat>* =
nullptr>
14inline Eigen::Matrix<value_type_t<EigMat>, EigMat::RowsAtCompileTime,
15 EigMat::RowsAtCompileTime>
20 const auto& m_ref =
to_ref(m);
21 auto ret =
multiply(m_ref, m_ref.transpose());
23 return Eigen::Matrix<value_type_t<EigMat>, EigMat::RowsAtCompileTime,
24 EigMat::RowsAtCompileTime>{{ret}};
Eigen::Matrix< value_type_t< EigMat >, EigMat::RowsAtCompileTime, EigMat::RowsAtCompileTime > tcrossprod(const EigMat &m)
auto multiply(const Mat1 &m1, const Mat2 &m2)
Return the product of the specified matrices.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Checks if decayed type is a var, fvar, or arithmetic.