pub enum TensorDotAxes<'a> {
Count(usize),
Axes {
lhs: &'a [isize],
rhs: &'a [isize],
},
}Expand description
Axis specification for TracedTensorEinsumExt::tensordot
contraction sugar.
Count(n) contracts the last n axes of the left operand with the first
n axes of the right operand. Axes contracts the explicitly paired axes
in the order they are provided, accepting negative indices relative to each
operand rank.
§Examples
use tenferro_einsum::TensorDotAxes;
let count = TensorDotAxes::Count(2);
let explicit = TensorDotAxes::Axes {
lhs: &[-1],
rhs: &[0],
};
assert_eq!(count, TensorDotAxes::Count(2));
assert_ne!(count, explicit);Variants§
Count(usize)
Contract the last n left axes with the first n right axes.
Axes
Contract explicit left/right axis pairs.
Trait Implementations§
Source§impl<'a> Clone for TensorDotAxes<'a>
impl<'a> Clone for TensorDotAxes<'a>
Source§fn clone(&self) -> TensorDotAxes<'a>
fn clone(&self) -> TensorDotAxes<'a>
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 moreSource§impl<'a> Debug for TensorDotAxes<'a>
impl<'a> Debug for TensorDotAxes<'a>
Source§impl<'a> PartialEq for TensorDotAxes<'a>
impl<'a> PartialEq for TensorDotAxes<'a>
impl<'a> Copy for TensorDotAxes<'a>
impl<'a> Eq for TensorDotAxes<'a>
impl<'a> StructuralPartialEq for TensorDotAxes<'a>
Auto Trait Implementations§
impl<'a> Freeze for TensorDotAxes<'a>
impl<'a> RefUnwindSafe for TensorDotAxes<'a>
impl<'a> Send for TensorDotAxes<'a>
impl<'a> Sync for TensorDotAxes<'a>
impl<'a> Unpin for TensorDotAxes<'a>
impl<'a> UnsafeUnpin for TensorDotAxes<'a>
impl<'a> UnwindSafe for TensorDotAxes<'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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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