1#ifndef STAN_MATH_PRIM_FUN_LOG_DETERMINANT_LDLT_HPP
2#define STAN_MATH_PRIM_FUN_LOG_DETERMINANT_LDLT_HPP
16template <
typename T, require_not_rev_matrix_t<T>* =
nullptr>
18 if (A.matrix().size() == 0) {
22 return sum(
log(A.ldlt().vectorD().array()));
LDLT_factor is a structure that holds a matrix of type T and the LDLT of its values.
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
value_type_t< T > log_determinant_ldlt(LDLT_factor< T > &A)
Returns log(abs(det(A))) given a LDLT_factor of A.
fvar< T > log(const fvar< T > &x)
auto sum(const std::vector< T > &m)
Return the sum of the entries of the specified standard vector.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...