55 template<
typename dtype>
61 if (!
shape.issquare())
71 lMatrix(col, col) = 1;
75 const double& divisor = uMatrix(col, col);
81 lMatrix(row, col) = uMatrix(row, col) / divisor;
85 uMatrix(row, col2) -= lMatrix(row, col) * uMatrix(col, col2);
90 return std::make_pair(lMatrix, uMatrix);
#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
std::pair< NdArray< double >, NdArray< double > > lu_decomposition(const NdArray< dtype > &inMatrix)
Definition lu_decomposition.hpp:56
bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept
Definition essentiallyEqual.hpp:49
NdArray< dtypeOut > zeros_like(const NdArray< dtype > &inArray)
Definition zeros_like.hpp:45
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