Trait InnerProduct

Source
pub trait InnerProduct<Rhs, Ul: Unsigned, Uh: Unsigned> {
    type Output;

    // Required method
    fn inner_product(self, rhs: Rhs) -> Self::Output;
}
Expand description

Trait representing the inner product of two tensors.

The inner product is just a multiplication followed by a contraction. The contraction is defined by type parameters Ul and Uh. Ul has to be less than Uh and the indices at those positions must be of opposite types (checked at compile time)

Required Associated Types§

Required Methods§

Source

fn inner_product(self, rhs: Rhs) -> Self::Output

Implementors§

Source§

impl<T, U, V, Ul, Uh> InnerProduct<Tensor<T, V>, Ul, Uh> for Tensor<T, U>
where T: CoordinateSystem, U: Variance + Concat<V>, V: Variance, Ul: Unsigned, Uh: Unsigned, T::Dimension: Pow<U::Rank> + Pow<V::Rank> + Pow<<Contracted<Joined<U, V>, Ul, Uh> as Variance>::Rank>, Exp<T::Dimension, U::Rank>: ArrayLength<f64>, Exp<T::Dimension, V::Rank>: ArrayLength<f64>, Joined<U, V>: Contract<Ul, Uh>, <Contracted<Joined<U, V>, Ul, Uh> as Variance>::Rank: ArrayLength<usize>, Exp<T::Dimension, <Contracted<Joined<U, V>, Ul, Uh> as Variance>::Rank>: ArrayLength<f64>,

Source§

type Output = Tensor<T, <<U as Concat<V>>::Output as Contract<Ul, Uh>>::Output>