Automatic Differentiation
 
Loading...
Searching...
No Matches
symmetrize_from_upper_tri.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_SYMMETRIZE_FROM_UPPER_TRI_HPP
2#define STAN_MATH_PRIM_FUN_SYMMETRIZE_FROM_UPPER_TRI_HPP
3
6
7namespace stan {
8namespace math {
9
18template <typename T, require_eigen_t<T>* = nullptr>
19inline Eigen::Matrix<value_type_t<T>, Eigen::Dynamic, Eigen::Dynamic>
21 check_square("symmetrize_from_upper_tri", "m", m);
22 return m.template selfadjointView<Eigen::Upper>();
23}
24
25} // namespace math
26} // namespace stan
27
28#endif
void check_square(const char *function, const char *name, const T_y &y)
Check if the specified matrix is square.
auto symmetrize_from_upper_tri(T_x &&x)
Return a symmetric matrix using elements from the lower triangular part of the input matrix.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9