Automatic Differentiation
 
Loading...
Searching...
No Matches
multiply_lower_tri_self_transpose.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_FWD_FUN_MULTIPLY_LOWER_TRI_SELF_TRANSPOSE_HPP
2#define STAN_MATH_FWD_FUN_MULTIPLY_LOWER_TRI_SELF_TRANSPOSE_HPP
3
8#include <vector>
9
10namespace stan {
11namespace math {
12
13template <typename EigMat, require_eigen_vt<is_fvar, EigMat>* = nullptr>
14inline Eigen::Matrix<value_type_t<EigMat>, EigMat::RowsAtCompileTime,
15 EigMat::RowsAtCompileTime>
17 if (m.rows() == 0) {
18 return {};
19 }
20 plain_type_t<EigMat> L = m.template triangularView<Eigen::Lower>();
21
22 return multiply(L, L.transpose());
23}
24
25} // namespace math
26} // namespace stan
27#endif
Eigen::Matrix< value_type_t< EigMat >, EigMat::RowsAtCompileTime, EigMat::RowsAtCompileTime > multiply_lower_tri_self_transpose(const EigMat &m)
auto multiply(const Mat1 &m1, const Mat2 &m2)
Return the product of the specified matrices.
Definition multiply.hpp:19
typename plain_type< T >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...