Module tensor_like

Module tensor_like 

Source
Expand description

TensorLike trait for unifying tensor types.

This module provides a fully generic trait for tensor-like objects that expose external indices and support contraction operations.

§Design

The trait is fully generic (monomorphic), meaning:

  • No trait objects (dyn TensorLike)
  • Uses associated type for Index
  • All methods return Self instead of concrete types

For heterogeneous tensor collections, use an enum wrapper.

Structs§

DirectSumResult
Result of direct sum operation.
FactorizeOptions
Options for tensor factorization.
FactorizeResult
Result of tensor factorization.

Enums§

AllowedPairs
Specifies which tensor pairs are allowed to contract.
Canonical
Canonical direction for factorization.
FactorizeAlg
Factorization algorithm.
FactorizeError
Error type for factorize operations.

Traits§

TensorLike
Trait for tensor-like objects that expose external indices and support contraction.