pub trait Tensorwhere
for<'a> Self: Sized + Debug + Display + Add<Self, Output = Self> + Add<&'a Self, Output = Self> + AddAssign + AddAssign<&'a Self> + Clone + Div<TensorRank0, Output = Self> + DivAssign<TensorRank0> + Mul<TensorRank0, Output = Self> + MulAssign<TensorRank0> + Sub<Self, Output = Self> + Sub<&'a Self, Output = Self> + SubAssign + SubAssign<&'a Self>,
Self::Item: Tensor,{
type Item;
// Required methods
fn iter(&self) -> impl Iterator<Item = &Self::Item>;
fn iter_mut(&mut self) -> impl Iterator<Item = &mut Self::Item>;
// Provided methods
fn full_contraction(&self, tensor: &Self) -> TensorRank0 { ... }
fn is_zero(&self) -> bool { ... }
fn norm(&self) -> TensorRank0 { ... }
fn norm_inf(&self) -> TensorRank0 { ... }
fn norm_squared(&self) -> TensorRank0 { ... }
fn normalize(&mut self) { ... }
fn normalized(self) -> Self { ... }
fn num_entries(&self) -> usize { ... }
}
Expand description
Common methods for tensors.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn full_contraction(&self, tensor: &Self) -> TensorRank0
fn full_contraction(&self, tensor: &Self) -> TensorRank0
Returns the full contraction with another tensor.
Sourcefn norm(&self) -> TensorRank0
fn norm(&self) -> TensorRank0
Returns the tensor norm.
Sourcefn norm_inf(&self) -> TensorRank0
fn norm_inf(&self) -> TensorRank0
Returns the infinity norm.
Sourcefn norm_squared(&self) -> TensorRank0
fn norm_squared(&self) -> TensorRank0
Returns the tensor norm squared.
Sourcefn normalized(self) -> Self
fn normalized(self) -> Self
Returns the tensor normalized.
Sourcefn num_entries(&self) -> usize
fn num_entries(&self) -> usize
Returns the total number of entries.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.