We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 754e94e + fe5dc6d commit ffeedb5Copy full SHA for ffeedb5
stan/math/prim/fun/chol2inv.hpp
@@ -5,7 +5,7 @@
5
#include <stan/math/prim/fun/Eigen.hpp>
6
#include <stan/math/prim/fun/dot_self.hpp>
7
#include <stan/math/prim/fun/dot_product.hpp>
8
-#include <stan/math/prim/fun/mdivide_left_tri_low.hpp>
+#include <stan/math/prim/fun/mdivide_left_tri.hpp>
9
#include <stan/math/prim/fun/inv_square.hpp>
10
11
namespace stan {
@@ -35,7 +35,7 @@ plain_type_t<T> chol2inv(const T& L) {
35
X.coeffRef(0) = inv_square(L_ref.coeff(0, 0));
36
return X;
37
}
38
- T_result L_inv = mdivide_left_tri_low(L_ref, T_result::Identity(K, K));
+ T_result L_inv = mdivide_left_tri<Eigen::Lower>(L_ref);
39
T_result X(K, K);
40
for (int k = 0; k < K; ++k) {
41
X.coeffRef(k, k) = dot_self(L_inv.col(k).tail(K - k).eval());
0 commit comments