1#ifndef STAN_MATH_PRIM_FUN_LDLT_FACTOR_HPP
2#define STAN_MATH_PRIM_FUN_LDLT_FACTOR_HPP
20template <
typename T,
typename Enable =
void>
31 is_eigen_matrix_dynamic<T>::value
32 && !is_var<scalar_type_t<T>>::value>::value>> {
35 Eigen::LDLT<plain_type_t<T>>
ldlt_;
41 : matrix_(matrix), ldlt_(matrix_.ldlt()) {}
46 const auto&
matrix()
const {
return matrix_; }
51 const auto&
ldlt()
const {
return ldlt_; }
61template <
typename T, require_matrix_t<T>* =
nullptr>
plain_type_t< T > matrix_
const auto & ldlt() const
Return a const reference to the LDLT factor of the matrix.
Eigen::LDLT< plain_type_t< T > > ldlt_
const auto & matrix() const
Return a const reference to the underlying matrix.
LDLT_factor(const S &matrix)
LDLT_factor is a structure that holds a matrix of type T and the LDLT of its values.
require_t< std::is_same< std::decay_t< T >, std::decay_t< S > > > require_same_t
Require types T and S satisfies std::is_same.
auto make_ldlt_factor(const T &A)
Make an LDLT_factor with matrix type plain_type_t<T>
typename plain_type< T >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...