pub struct ContractionSpec<I: IndexLike> {
pub axes_a: Vec<usize>,
pub axes_b: Vec<usize>,
pub result_indices: Vec<I>,
pub result_dims: Vec<usize>,
}Expand description
Result of preparing a tensor contraction.
Contains all the information needed to perform the contraction:
- Which axes to contract from each tensor
- The resulting indices and dimensions after contraction
Fields§
§axes_a: Vec<usize>Axes to contract from the first tensor (positions in indices_a).
axes_b: Vec<usize>Axes to contract from the second tensor (positions in indices_b).
result_indices: Vec<I>Indices of the result tensor (non-contracted indices from both tensors).
result_dims: Vec<usize>Dimensions of the result tensor.
Trait Implementations§
Source§impl<I: Clone + IndexLike> Clone for ContractionSpec<I>
impl<I: Clone + IndexLike> Clone for ContractionSpec<I>
Source§fn clone(&self) -> ContractionSpec<I>
fn clone(&self) -> ContractionSpec<I>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<I> Freeze for ContractionSpec<I>
impl<I> RefUnwindSafe for ContractionSpec<I>where
I: RefUnwindSafe,
impl<I> Send for ContractionSpec<I>
impl<I> Sync for ContractionSpec<I>
impl<I> Unpin for ContractionSpec<I>where
I: Unpin,
impl<I> UnwindSafe for ContractionSpec<I>where
I: UnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more