53 template<
typename dtype>
87 result(k, k) = -1. / inArrayDouble(k, k);
92 if ((i - k) && (j - k))
94 result(i, j) = inArrayDouble(i, j) + inArrayDouble(k, j) * inArrayDouble(i, k) * result(k, k);
96 else if ((i - k) && !(j - k))
98 result(i, k) = inArrayDouble(i, k) * result(k, k);
100 else if (!(i - k) && (j - k))
102 result(k, j) = inArrayDouble(k, j) * result(k, k);
107 inArrayDouble = result;
112 for (
int i =
static_cast<int>(inShape.
rows) - 1; i >= 0; --i)
114 if (incidence(i, i) != 1)
120 for (; k < static_cast<int>(inShape.
cols); ++k)
122 if ((k - i) && incidence(i, k) != 0)
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition Error.hpp:37
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition StaticAsserts.hpp:56
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
self_type & swapCols(index_type colIdx1, index_type colIdx2) noexcept
Definition NdArrayCore.hpp:4752
self_type & swapRows(index_type rowIdx1, index_type rowIdx2) noexcept
Definition NdArrayCore.hpp:4770
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4591
A Shape Class for NdArrays.
Definition Core/shape.hpp:41
uint32 rows
Definition Core/shape.hpp:44
uint32 cols
Definition Core/shape.hpp:45
Definition cholesky.hpp:41
NdArray< double > inv(const NdArray< dtype > &inArray)
Definition inv.hpp:54
bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept
Definition essentiallyEqual.hpp:49
NdArray< dtype > zeros(uint32 inSquareSize)
Definition zeros.hpp:48
NdArray< dtypeOut > astype(const NdArray< dtype > inArray)
Definition astype.hpp:45
std::uint32_t uint32
Definition Types.hpp:40