mprod.decompositions.tqrm¶
- mprod.decompositions.tqrm(tens_a: numpy.ndarray, fun_m: Callable[numpy.ndarray, numpy.ndarray], inv_m: Callable[numpy.ndarray, numpy.ndarray], hats: bool = False) Tuple[numpy.ndarray, numpy.ndarray][source]¶
The
tqrmimplements tensor-QR decomposition:Q,R = tqrm(tensor_a, m, inv_m)whereQis M-orthogonal tensor of shape(m,m,n)andRis f-upper triangular tensor of shape(m,p,n)- Parameters
- tens_a: np.ndarray
Tensor of shape
(m,p,n)- fun_m: MatrixTensorProduct
Invertible mat-vec operation for transforming
tens_atube fibers- inv_m: MatrixTensorProduct
Invertible mat-vec operation for transforming
tens_atube fibers. This operation is the inverse offun_m- hats: bool
Setting this to
Truewill cause the function to return the tqrm factors in the tensor domain transform.
- Returns
- tens_q: np.ndarray
M-orthogonal tensor of shape
(m,m,n)- tens_r: np.ndarray
f-upper triangular tensor of shape
(m,p,n)