49 template<
typename dtype>
83 result(k, k) = -1. / inArrayDouble(k, k);
88 if ((i - k) && (j - k))
90 result(i, j) = inArrayDouble(i, j) + inArrayDouble(k, j) * inArrayDouble(i, k) * result(k, k);
92 else if ((i - k) && !(j - k))
94 result(i, k) = inArrayDouble(i, k) * result(k, k);
96 else if (!(i - k) && (j - k))
98 result(k, j) = inArrayDouble(k, j) * result(k, k);
103 inArrayDouble = result;
108 for (
int i =
static_cast<int>(inShape.
rows) - 1; i >= 0; --i)
110 if (incidence(i, i) != 1)
116 for (; k < static_cast<int>(inShape.
cols); ++k)
118 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:135
self_type & swapCols(index_type colIdx1, index_type colIdx2) noexcept
Definition NdArrayCore.hpp:4748
self_type & swapRows(index_type rowIdx1, index_type rowIdx2) noexcept
Definition NdArrayCore.hpp:4766
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4587
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:50
bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept
Definition essentiallyEqual.hpp:47
NdArray< dtype > zeros(uint32 inSquareSize)
Definition zeros.hpp:48
NdArray< dtypeOut > astype(const NdArray< dtype > inArray)
Definition astype.hpp:43
std::uint32_t uint32
Definition Types.hpp:40