pub struct SingletonContraction<A> {
method: SingletonMethod,
op: Box<dyn SingletonContractor<A>>,
}Expand description
Holds a Boxed SingletonContractor trait object.
Constructed at runtime based on the number of diagonalized, summed, and permuted axes
in the input. Reimplements the SingletonContractor trait by delegating to the inner
object.
For example, the contraction iij->i will be performed by assigning a Boxed
DiagonalizationAndSummation to op. The contraction ijk->kij will be performed
by assigning a Boxed Permutation to op.
Fields§
§method: SingletonMethod§op: Box<dyn SingletonContractor<A>>Implementations§
Source§impl<A> SingletonContraction<A>
impl<A> SingletonContraction<A>
pub fn new(sc: &SizedContraction) -> Self
Trait Implementations§
Source§impl<A> Debug for SingletonContraction<A>
impl<A> Debug for SingletonContraction<A>
Source§impl<A> SingletonContractor<A> for SingletonContraction<A>
impl<A> SingletonContractor<A> for SingletonContraction<A>
fn contract_singleton<'a, 'b>(&self, tensor: &'b ArrayViewD<'a, A>) -> ArrayD<A>where
A: Clone + LinalgScalar,
'a: 'b,
Auto Trait Implementations§
impl<A> Freeze for SingletonContraction<A>
impl<A> !RefUnwindSafe for SingletonContraction<A>
impl<A> !Send for SingletonContraction<A>
impl<A> !Sync for SingletonContraction<A>
impl<A> Unpin for SingletonContraction<A>
impl<A> !UnwindSafe for SingletonContraction<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