Automatic Differentiation
 
Loading...
Searching...
No Matches
is_ldlt_factor.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_ERR_IS_LDLT_FACTOR_HPP
2#define STAN_MATH_PRIM_ERR_IS_LDLT_FACTOR_HPP
3
7
8namespace stan {
9namespace math {
10
20template <typename T>
22 return A.ldlt().info() == Eigen::Success && A.ldlt().isPositive()
23 && (A.ldlt().vectorD().array() > 0).all();
24}
25
26} // namespace math
27} // namespace stan
28#endif
LDLT_factor is a structure that holds a matrix of type T and the LDLT of its values.
constexpr bool all(T x)
Return true if all values in the input are true.
Definition all.hpp:21
bool is_ldlt_factor(LDLT_factor< T > &A)
Return true if the specified LDLT factor is invalid.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9