pub struct TensorRank2SparseVec<const D: usize, I, J, U = Dimensionless>(/* private fields */);Expand description
A sparse vector of rank-2 tensors, storing only inserted entries.
Implementations§
Source§impl<const D: usize, I, J, U> TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> TensorRank2SparseVec<D, I, J, U>
pub fn entries(&self) -> impl Iterator<Item = (usize, &TensorRank2<D, I, J, U>)>
Trait Implementations§
Source§impl<const D: usize, I, J, U> Add for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Add for TensorRank2SparseVec<D, I, J, U>
Source§impl<const D: usize, I, J, U> Add<&TensorRank2SparseVec<D, I, J, U>> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Add<&TensorRank2SparseVec<D, I, J, U>> for TensorRank2SparseVec<D, I, J, U>
Source§impl<const D: usize, I, J, U> AddAssign for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> AddAssign for TensorRank2SparseVec<D, I, J, U>
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moreSource§impl<const D: usize, I, J, U> AddAssign<&TensorRank2SparseVec<D, I, J, U>> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> AddAssign<&TensorRank2SparseVec<D, I, J, U>> for TensorRank2SparseVec<D, I, J, U>
Source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+= operation. Read moreSource§impl<const D: usize, I, J> AssertEq for TensorRank2SparseVec<D, I, J>
impl<const D: usize, I, J> AssertEq for TensorRank2SparseVec<D, I, J>
fn eq(a: Self, b: TensorRank2SparseVec<D, I, J>) -> Result<(), AssertionError>
fn eq_within_tols( tols: &Assert, a: Self, b: TensorRank2SparseVec<D, I, J>, ) -> Result<(), AssertionError>
Source§impl<const D: usize, I, J, U> Clone for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Clone for TensorRank2SparseVec<D, I, J, U>
Source§impl<const D: usize, I, J, U> Debug for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Debug for TensorRank2SparseVec<D, I, J, U>
Source§impl<const D: usize, I, J, U> Default for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Default for TensorRank2SparseVec<D, I, J, U>
Source§impl<const D: usize, I, J, U> Display for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Display for TensorRank2SparseVec<D, I, J, U>
Source§impl<const D: usize, I, J, U> Div<f64> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Div<f64> for TensorRank2SparseVec<D, I, J, U>
Source§type Output = TensorRank2SparseVec<D, I, J, U>
type Output = TensorRank2SparseVec<D, I, J, U>
The resulting type after applying the
/ operator.Source§fn div(self, scalar: TensorRank0) -> Self
fn div(self, scalar: TensorRank0) -> Self
Performs the
/ operation. Read moreSource§impl<const D: usize, I, J, U> DivAssign<&f64> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> DivAssign<&f64> for TensorRank2SparseVec<D, I, J, U>
Source§fn div_assign(&mut self, scalar: &TensorRank0)
fn div_assign(&mut self, scalar: &TensorRank0)
Performs the
/= operation. Read moreSource§impl<const D: usize, I, J, U> DivAssign<f64> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> DivAssign<f64> for TensorRank2SparseVec<D, I, J, U>
Source§fn div_assign(&mut self, scalar: TensorRank0)
fn div_assign(&mut self, scalar: TensorRank0)
Performs the
/= operation. Read moreSource§impl<const D: usize, I, J, U> FromIterator<TensorRank2<D, I, J, U>> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> FromIterator<TensorRank2<D, I, J, U>> for TensorRank2SparseVec<D, I, J, U>
Source§fn from_iter<T>(into_iterator: T) -> Selfwhere
T: IntoIterator<Item = TensorRank2<D, I, J, U>>,
fn from_iter<T>(into_iterator: T) -> Selfwhere
T: IntoIterator<Item = TensorRank2<D, I, J, U>>,
Creates a value from an iterator. Read more
Source§impl<const D: usize, I, J, U> Mul<f64> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Mul<f64> for TensorRank2SparseVec<D, I, J, U>
Source§type Output = TensorRank2SparseVec<D, I, J, U>
type Output = TensorRank2SparseVec<D, I, J, U>
The resulting type after applying the
* operator.Source§fn mul(self, scalar: TensorRank0) -> Self
fn mul(self, scalar: TensorRank0) -> Self
Performs the
* operation. Read moreSource§impl<const D: usize, I, J, U> MulAssign<&f64> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> MulAssign<&f64> for TensorRank2SparseVec<D, I, J, U>
Source§fn mul_assign(&mut self, scalar: &TensorRank0)
fn mul_assign(&mut self, scalar: &TensorRank0)
Performs the
*= operation. Read moreSource§impl<const D: usize, I, J, U> MulAssign<f64> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> MulAssign<f64> for TensorRank2SparseVec<D, I, J, U>
Source§fn mul_assign(&mut self, scalar: TensorRank0)
fn mul_assign(&mut self, scalar: TensorRank0)
Performs the
*= operation. Read moreSource§impl<const D: usize, I, J, U> PartialEq for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> PartialEq for TensorRank2SparseVec<D, I, J, U>
Source§impl<const D: usize, I, J, U> Sub for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Sub for TensorRank2SparseVec<D, I, J, U>
Source§impl<const D: usize, I, J, U> Sub<&TensorRank2SparseVec<D, I, J, U>> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Sub<&TensorRank2SparseVec<D, I, J, U>> for TensorRank2SparseVec<D, I, J, U>
Source§impl<const D: usize, I, J, U> SubAssign for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> SubAssign for TensorRank2SparseVec<D, I, J, U>
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreSource§impl<const D: usize, I, J, U> SubAssign<&TensorRank2SparseVec<D, I, J, U>> for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> SubAssign<&TensorRank2SparseVec<D, I, J, U>> for TensorRank2SparseVec<D, I, J, U>
Source§fn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Performs the
-= operation. Read moreSource§impl<const D: usize, I, J, U> Sum for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Sum for TensorRank2SparseVec<D, I, J, U>
Source§impl<const D: usize, I, J, U> Tensor for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Tensor for TensorRank2SparseVec<D, I, J, U>
Source§type Item = TensorRank2<D, I, J, U>
type Item = TensorRank2<D, I, J, U>
The type of item encountered when iterating over the tensor.
Source§fn iter_mut(&mut self) -> impl Iterator<Item = &mut Self::Item>
fn iter_mut(&mut self) -> impl Iterator<Item = &mut Self::Item>
Returns an iterator that allows modifying each value. Read more
Source§fn error_count_zero(&self, tol_abs: Scalar, tol_rel: Scalar) -> Option<usize>
fn error_count_zero(&self, tol_abs: Scalar, tol_rel: Scalar) -> Option<usize>
Returns number of nonzero entries given absolute and relative tolerances.
Source§fn 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.
Source§fn full_contraction(&self, tensor: &Self) -> TensorRank0
fn full_contraction(&self, tensor: &Self) -> TensorRank0
Returns the full contraction with another tensor.
Source§fn norm_p_sum(&self, p: TensorRank0) -> TensorRank0
fn norm_p_sum(&self, p: TensorRank0) -> TensorRank0
Returns the sum of p-th powers of absolute values (used internally by
norm_p).Auto Trait Implementations§
impl<const D: usize, I, J, U> Freeze for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> RefUnwindSafe for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Send for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Sync for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> Unpin for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> UnsafeUnpin for TensorRank2SparseVec<D, I, J, U>
impl<const D: usize, I, J, U> UnwindSafe for TensorRank2SparseVec<D, I, J, U>
Blanket Implementations§
Source§impl<'a, T> AssertEq<&'a T> for T
impl<'a, T> AssertEq<&'a T> for T
fn eq(a: T, b: &'a T) -> Result<(), AssertionError>
fn eq_within_tols(tols: &Assert, a: T, b: &'a T) -> Result<(), AssertionError>
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