Skip to main content

contract_pair

Function contract_pair 

Source
pub fn contract_pair(
    lhs: &IdxTensor,
    rhs: &IdxTensor,
) -> Result<IdxTensor, IdxTensorError>
Expand description

Contract two tensors with the default pairwise semantics.

This is the concrete IdxTensor entry point for binary contraction. It contracts all common indices and preserves the pairwise structured fast paths used by [TensorContractionLike::contract_pair].

ยงErrors

Returns an error when the pair is disconnected or has incompatible indices /// (a shape or index mismatch), or when the contraction reports a failure (a /// backend failure).