54 template<
typename dtype>
60 if (!
shape.issquare())
70 lMatrix(col, col) = 1;
74 const double& divisor = uMatrix(col, col);
80 lMatrix(row, col) = uMatrix(row, col) / divisor;
84 uMatrix(row, col2) -= lMatrix(row, col) * uMatrix(col, col2);
89 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:135
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4587
Definition cholesky.hpp:41
std::pair< NdArray< double >, NdArray< double > > lu_decomposition(const NdArray< dtype > &inMatrix)
Definition lu_decomposition.hpp:55
bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept
Definition essentiallyEqual.hpp:47
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:43
std::uint32_t uint32
Definition Types.hpp:40