55 template<
typename dtype>
89 result(k, k) = -1. / inArrayDouble(k, k);
94 if ((i - k) && (
j - k))
97 inArrayDouble(i,
j) + inArrayDouble(k,
j) * inArrayDouble(i, k) * result(k, k);
99 else if ((i - k) && !(
j - k))
101 result(i, k) = inArrayDouble(i, k) * result(k, k);
103 else if (!(i - k) && (
j - k))
105 result(k,
j) = inArrayDouble(k,
j) * result(k, k);
110 inArrayDouble = result;
115 for (
int i =
static_cast<int>(inShape.
rows) - 1; i >= 0; --i)
117 if (incidence(i, i) != 1)
123 for (; k < static_cast<int>(inShape.
cols); ++k)
125 if ((k - i) && incidence(i, k) != 0)
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:36
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition: StaticAsserts.hpp:49
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4092
void swapCols(int32 colIdx1, int32 colIdx2) noexcept
Definition: NdArrayCore.hpp:4251
void swapRows(int32 rowIdx1, int32 rowIdx2) noexcept
Definition: NdArrayCore.hpp:4266
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
uint32 rows
Definition: Core/Shape.hpp:44
uint32 cols
Definition: Core/Shape.hpp:45
constexpr auto j
Definition: Constants.hpp:45
NdArray< double > inv(const NdArray< dtype > &inArray)
Definition: inv.hpp:56
bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept
Definition: essentiallyEqual.hpp:51
Definition: Coordinate.hpp:45
std::uint32_t uint32
Definition: Types.hpp:40