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
7#include <vector>
8
9namespace stan {
10namespace math {
11
12template <typename EigMat, require_eigen_vt<is_fvar, EigMat>* = nullptr>
13inline Eigen::Matrix<value_type_t<EigMat>, EigMat::RowsAtCompileTime,
14 EigMat::RowsAtCompileTime>
16 if (m.rows() == 0) {
17 return {};
18 }
19 plain_type_t<EigMat> L = m.template triangularView<Eigen::Lower>();
20
21 return multiply(L, L.transpose());
22}
23
24} // namespace math
25} // namespace stan
26#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:18
typename plain_type< T >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9