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;
Show 13 methods
// Required methods
fn iter(&self) -> impl Iterator<Item = &Self::Item>;
fn iter_mut(&mut self) -> impl Iterator<Item = &mut Self::Item>;
// Provided methods
fn error_count(
&self,
other: &Self,
tol_abs: &Scalar,
tol_rel: &Scalar,
) -> Option<usize> { ... }
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 { ... }
fn sub_abs(&self, other: &Self) -> Self { ... }
fn sub_rel(&self, other: &Self) -> Self { ... }
}
Expand description
Common methods for tensors.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn error_count(
&self,
other: &Self,
tol_abs: &Scalar,
tol_rel: &Scalar,
) -> Option<usize>
fn error_count( &self, other: &Self, tol_abs: &Scalar, tol_rel: &Scalar, ) -> Option<usize>
Returns number of different entries given absolute and relative tolerances.
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.