multiplyTransposed method

FLeftMatrix multiplyTransposed(
  1. FVector other
)

Multiplies this vector by the transposed other vector.

Multiplying column vector by row vector creates a matrix.

Implementation

FLeftMatrix multiplyTransposed(FVector other) {
  FLeftMatrix result = FLeftMatrix.zero(other.nRows, this.nRows);
  Float32List columnVec = this.columnData.buffer.asFloat32List();
  Float32List rowVec = other.columnData.buffer.asFloat32List();
  for (int r = 0; r < this.nRows; ++r) {
    var resRow = result.rowsData[r].buffer.asFloat32List();
    for (int c = 0; c < other.nRows; ++c) {
      resRow[c] = columnVec[r] * rowVec[c];
    }
  }
  return result;
}