pub fn einsum_with_plan<T: Scalar + HasAlgebra>(
tree: &ContractionTree,
operands: &[&Tensor<T>],
) -> Result<Tensor<T>>Expand description
Execute einsum with a pre-optimized ContractionTree.
Avoids both subscript parsing and contraction order optimization. Ideal for hot loops where the same contraction is executed repeatedly on tensors of the same shape.
ยงErrors
Returns an error if the operand shapes do not match those used to build the contraction tree.