Skip to main content

ReassociateKernel

Trait ReassociateKernel 

Source
pub trait ReassociateKernel<P>: Tensor {
    type Reassociated: Tensor<F = Self::F, Hand = Self::Hand, Action = Self::Action>;

    // Required method
    fn reassociate_kernel(self) -> Self::Reassociated;
}
Expand description

Applies one reassociation at a node selected by a type-level tree path.

Tensor subtrees are atomic unless the path explicitly enters them. Thus a TensorProduct<A, B> may be treated as one vector space by an operation at its parent, or opened by OnLeft and OnRight when its construction is relevant.

Required Associated Types§

Source

type Reassociated: Tensor<F = Self::F, Hand = Self::Hand, Action = Self::Action>

The same tensor factors and coordinate order in the new presentation.

Required Methods§

Source

fn reassociate_kernel(self) -> Self::Reassociated

Performs the selected coordinate-preserving associativity isomorphism.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<A, B, C> ReassociateKernel<Left> for TensorProduct<A, Sinister<TensorProduct<B, C>>>
where A: Tensor<Hand = Right, Action = BothSided>, B: Tensor<F = A::F, Hand = Right, Action = BothSided>, C: Tensor<F = A::F, Hand = Left, Action = BothSided>,

Source§

impl<A, B, C> ReassociateKernel<Right> for TensorProduct<TensorProduct<A, B>, C>
where A: Tensor<Hand = Right, Action = BothSided>, B: Tensor<F = A::F, Hand = Left, Action = BothSided>, C: Tensor<F = A::F, Hand = Left, Action = BothSided>,

Source§

impl<A, B, P> ReassociateKernel<OnLeft<P>> for TensorProduct<A, B>
where A: Tensor<Hand = Right, Action: TensorProductAction<B::Action>> + ReassociateKernel<P>, B: Tensor<F = A::F, Hand = Left, Action: ActionExists>, <A as ReassociateKernel<P>>::Reassociated: Tensor<F = A::F, Hand = Right, Action = A::Action>,

Source§

impl<A, B, P> ReassociateKernel<OnRight<P>> for TensorProduct<A, B>
where A: Tensor<Hand = Right, Action: TensorProductAction<B::Action>>, B: Tensor<F = A::F, Hand = Left, Action: ActionExists> + ReassociateKernel<P>, <B as ReassociateKernel<P>>::Reassociated: Tensor<F = A::F, Hand = Left, Action = B::Action>,

Source§

impl<T, P> ReassociateKernel<ThroughSinister<P>> for Sinister<T>
where T: Tensor<Action = BothSided> + ReassociateKernel<P>, <T as ReassociateKernel<P>>::Reassociated: Tensor<F = T::F, Hand = T::Hand, Action = BothSided>,