QRDecomposition

class trainsum.qrdecomposition.QRDecomposition

QR decomposition. Decomposes a matrix into an orthonormal matrix and an upper triangular matrix.

right(mat)

Calculate \(M=QR\) and return \(Q\) and \(R\).

Parameters:

mat (T)

Return type:

MatrixDecompositionResult

left(mat)

Calculate \(M=LQ\) and return \(L\) and \(Q\).

Parameters:

mat (T)

Return type:

MatrixDecompositionResult

left_shape(shape)

Calculate the shape of the left function.

Parameters:

shape (tuple[int, int])

Return type:

tuple[tuple[int, int], tuple[int, int]]

right_shape(shape)

Calculate the shape of the right function.

Parameters:

shape (tuple[int, int])

Return type:

tuple[tuple[int, int], tuple[int, int]]