19 int32 Key = i * MSize + j;
20 if (!MValues.Contains(Key))
22 MValues.Add(Key, T());
23 if (!RowToIndicesMap.Contains(i))
25 RowToIndicesMap.Add(i, {j});
29 RowToIndicesMap[i].Add(j);
36 int32 Key = i * MSize + j;
37 check(MValues.Contains(Key));
44 for (
int32 i = 0; i < MSize; ++i)
47 if (!RowToIndicesMap.Contains(i))
49 for (
auto j : RowToIndicesMap[i])
51 result[i] += (*this)(i, j) *
vector[j];
#define check(expr)
Definition AssertionMacros.h:314
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition SparseMatrix.h:11
VectorND< T > operator*(const VectorND< T > &vector) const
Definition SparseMatrix.h:40
T operator()(const int32 i, const int32 j)
Definition SparseMatrix.h:17
const T operator()(const int32 i, const int32 j) const
Definition SparseMatrix.h:34
SparseMatrix(const int32 size)
Definition SparseMatrix.h:13
~SparseMatrix()
Definition SparseMatrix.h:15
Definition UnrealString.h.inl:34
Definition SkeletalMeshComponent.h:307