pub struct EinsumPath<A> {
pub contraction_order: ContractionOrder,
pub steps: EinsumPathSteps<A>,
}Expand description
An EinsumPath, returned by einsum_path, represents a fully-prepared plan to perform a tensor contraction.
It contains the order in which the input tensors should be contracted with one another or with one of the previous intermediate results,
and for each step in the path, how to perform the pairwise contraction. For example, two tensors might be contracted
with one another by computing the Hadamard (element-wise) product of the tensors, while a different pair might be contracted
by performing a matrix multiplication. The contractions that will be performed are fully specified within the EinsumPath.
Fields§
§contraction_order: ContractionOrderThe order in which tensors should be paired off and contracted with one another
steps: EinsumPathSteps<A>The details of the contractions to be performed
Implementations§
Source§impl<A> EinsumPath<A>
impl<A> EinsumPath<A>
pub fn new(sc: &SizedContraction) -> Self
pub fn from_path(contraction_order: &ContractionOrder) -> Self
Source§impl<A> EinsumPath<A>
impl<A> EinsumPath<A>
pub fn contract_operands(&self, operands: &[&dyn ArrayLike<A>]) -> ArrayD<A>where
A: Clone + LinalgScalar,
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for EinsumPath<A>
impl<A> !RefUnwindSafe for EinsumPath<A>
impl<A> !Send for EinsumPath<A>
impl<A> !Sync for EinsumPath<A>
impl<A> Unpin for EinsumPath<A>
impl<A> !UnwindSafe for EinsumPath<A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more