gwnavruntime/abstractgraph/blobs/halfsquarematrix.h Source File
Go to the documentation of this file.
17 class HalfSquareMatrix
28 , m_bufferSize(bufferSize)
34 if (rowIdx < columnIdx)
36 KyUInt32 index = GetIndexInHalfMatrix(rowIdx, columnIdx);
37 return &m_buffer[index];
39 else if (rowIdx > columnIdx)
40 return GetValue(columnIdx, rowIdx);
50 KY_ASSERT(rowIdx < columnIdx);
53 KyUInt32 fullMatrixIdx = count * rowIdx + columnIdx;
54 KyUInt32 rowSizedMatrixLength = rowIdx+1;
55 KyUInt32 rowSizedMatrixSize = rowSizedMatrixLength*rowSizedMatrixLength;
56 KyUInt32 rowSizedHalfMatrixSize = (rowSizedMatrixSize - rowSizedMatrixLength)/2;
57 KyUInt32 elementToRemoveFromFullMatrix = rowSizedMatrixSize - rowSizedHalfMatrixSize;
58 KyUInt32 index = fullMatrixIdx - elementToRemoveFromFullMatrix;
77 return ((count*count)-count) / 2;
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17