pub fn factorize(
t: &TensorDynLen,
left_inds: &[DynIndex],
options: &FactorizeOptions,
) -> Result<FactorizeResult<TensorDynLen>, FactorizeError>Expand description
Factorize a tensor into left and right factors.
This function dispatches to the appropriate algorithm based on options.alg:
SVD: Singular Value DecompositionQR: QR decompositionLU: Rank-revealing LU decompositionCI: Cross Interpolation
The canonical option controls which factor is “canonical”:
Canonical::Left: Left factor is orthogonal (SVD/QR) or unit-diagonal (LU/CI)Canonical::Right: Right factor is orthogonal (SVD) or unit-diagonal (LU/CI)
§Arguments
t- Input tensorleft_inds- Indices to place on the left sideoptions- Factorization options
§Returns
A FactorizeResult containing the left and right factors, bond index,
singular values (for SVD), and rank.
§Errors
Returns FactorizeError if:
- The storage type is not supported (only DenseF64 and DenseC64)
- QR is used with
Canonical::Right - The underlying algorithm fails