53 template<
typename dtype>
59 if (!
shape.issquare())
70 lMatrix(row, col) = 0.;
76 const double& a_kk = lMatrix(k, k);
80 lMatrix(k, k) = std::sqrt(a_kk);
84 lMatrix(i, k) /= lMatrix(k, k);
86 for (
uint32 j = k + 1; j <= i; ++j)
88 lMatrix(i, j) -= lMatrix(i, k) * lMatrix(j, k);
#define THROW_RUNTIME_ERROR(msg)
Definition Error.hpp:40
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition StaticAsserts.hpp:39
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4591
Definition cholesky.hpp:41
NdArray< double > cholesky(const NdArray< dtype > &inMatrix)
Definition cholesky.hpp:54
Shape shape(const NdArray< dtype > &inArray) noexcept
Definition Functions/shape.hpp:42
NdArray< dtypeOut > astype(const NdArray< dtype > inArray)
Definition astype.hpp:45
std::uint32_t uint32
Definition Types.hpp:40