Struct opensrdk_linear_algebra::tensor::sparse::SparseTensor
source · pub struct SparseTensor<T = f64>where
T: Number,{ /* private fields */ }
Implementations§
source§impl<T> SparseTensor<T>where
T: Number,
impl<T> SparseTensor<T>where T: Number,
pub fn mul_kronecker_deltas(&self, deltas: &[KroneckerDelta]) -> Self
source§impl<T> SparseTensor<T>where
T: Number,
impl<T> SparseTensor<T>where T: Number,
pub fn inner_prod(self, rhs: Self, rank_pairs: &[[RankIndex; 2]]) -> Self
source§impl<T> SparseTensor<T>where
T: Number,
impl<T> SparseTensor<T>where T: Number,
pub fn new(sizes: Vec<usize>) -> Self
pub fn from(sizes: Vec<usize>, elems: HashMap<Vec<usize>, T>) -> Self
pub fn is_same_size(&self, other: &SparseTensor<T>) -> bool
pub fn total_size(&self) -> usize
pub fn not_1dimension_ranks(&self) -> usize
pub fn reduce_1dimension_rank(&self) -> Self
pub fn to_vec(&self) -> Vec<T>
pub fn to_mat(&self) -> Matrix<T>
Trait Implementations§
source§impl Add<&SparseTensor<Complex<f64>>> for SparseTensor<c64>
impl Add<&SparseTensor<Complex<f64>>> for SparseTensor<c64>
source§impl Add<&SparseTensor<f64>> for SparseTensor<f64>
impl Add<&SparseTensor<f64>> for SparseTensor<f64>
source§impl Add<SparseTensor<Complex<f64>>> for &SparseTensor<c64>
impl Add<SparseTensor<Complex<f64>>> for &SparseTensor<c64>
source§impl Add<SparseTensor<Complex<f64>>> for SparseTensor<c64>
impl Add<SparseTensor<Complex<f64>>> for SparseTensor<c64>
source§impl Add<SparseTensor<f64>> for &SparseTensor<f64>
impl Add<SparseTensor<f64>> for &SparseTensor<f64>
source§impl Add<SparseTensor<f64>> for SparseTensor<f64>
impl Add<SparseTensor<f64>> for SparseTensor<f64>
source§impl<T> Clone for SparseTensor<T>where
T: Number + Clone,
impl<T> Clone for SparseTensor<T>where T: Number + Clone,
source§fn clone(&self) -> SparseTensor<T>
fn clone(&self) -> SparseTensor<T>
Returns a copy 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 Mul<&SparseTensor<Complex<f64>>> for &SparseTensor<c64>
impl Mul<&SparseTensor<Complex<f64>>> for &SparseTensor<c64>
source§impl Mul<&SparseTensor<Complex<f64>>> for SparseTensor<c64>
impl Mul<&SparseTensor<Complex<f64>>> for SparseTensor<c64>
source§impl<T> Mul<&SparseTensor<T>> for KroneckerDeltawhere
T: Number,
impl<T> Mul<&SparseTensor<T>> for KroneckerDeltawhere T: Number,
§type Output = SparseTensor<T>
type Output = SparseTensor<T>
The resulting type after applying the
*
operator.source§impl<T> Mul<&SparseTensor<T>> for Vec<KroneckerDelta>where
T: Number,
impl<T> Mul<&SparseTensor<T>> for Vec<KroneckerDelta>where T: Number,
§type Output = SparseTensor<T>
type Output = SparseTensor<T>
The resulting type after applying the
*
operator.source§impl Mul<&SparseTensor<f64>> for &SparseTensor<f64>
impl Mul<&SparseTensor<f64>> for &SparseTensor<f64>
source§impl Mul<&SparseTensor<f64>> for SparseTensor<f64>
impl Mul<&SparseTensor<f64>> for SparseTensor<f64>
source§impl<T> Mul<KroneckerDelta> for &SparseTensor<T>where
T: Number,
impl<T> Mul<KroneckerDelta> for &SparseTensor<T>where T: Number,
§type Output = SparseTensor<T>
type Output = SparseTensor<T>
The resulting type after applying the
*
operator.source§impl<T> Mul<KroneckerDelta> for SparseTensor<T>where
T: Number,
impl<T> Mul<KroneckerDelta> for SparseTensor<T>where T: Number,
§type Output = SparseTensor<T>
type Output = SparseTensor<T>
The resulting type after applying the
*
operator.source§impl Mul<SparseTensor<Complex<f64>>> for &SparseTensor<c64>
impl Mul<SparseTensor<Complex<f64>>> for &SparseTensor<c64>
source§impl Mul<SparseTensor<Complex<f64>>> for SparseTensor<c64>
impl Mul<SparseTensor<Complex<f64>>> for SparseTensor<c64>
source§impl<T> Mul<SparseTensor<T>> for KroneckerDeltawhere
T: Number,
impl<T> Mul<SparseTensor<T>> for KroneckerDeltawhere T: Number,
§type Output = SparseTensor<T>
type Output = SparseTensor<T>
The resulting type after applying the
*
operator.source§impl<T> Mul<SparseTensor<T>> for Vec<KroneckerDelta>where
T: Number,
impl<T> Mul<SparseTensor<T>> for Vec<KroneckerDelta>where T: Number,
§type Output = SparseTensor<T>
type Output = SparseTensor<T>
The resulting type after applying the
*
operator.source§impl Mul<SparseTensor<f64>> for &SparseTensor<f64>
impl Mul<SparseTensor<f64>> for &SparseTensor<f64>
source§impl Mul<SparseTensor<f64>> for SparseTensor<f64>
impl Mul<SparseTensor<f64>> for SparseTensor<f64>
source§impl<T> Mul<Vec<KroneckerDelta, Global>> for &SparseTensor<T>where
T: Number,
impl<T> Mul<Vec<KroneckerDelta, Global>> for &SparseTensor<T>where T: Number,
§type Output = SparseTensor<T>
type Output = SparseTensor<T>
The resulting type after applying the
*
operator.source§impl<T> Mul<Vec<KroneckerDelta, Global>> for SparseTensor<T>where
T: Number,
impl<T> Mul<Vec<KroneckerDelta, Global>> for SparseTensor<T>where T: Number,
§type Output = SparseTensor<T>
type Output = SparseTensor<T>
The resulting type after applying the
*
operator.source§impl<T> Neg for SparseTensor<T>where
T: Number,
impl<T> Neg for SparseTensor<T>where T: Number,
source§impl<T> PartialEq<SparseTensor<T>> for SparseTensor<T>where
T: Number + PartialEq,
impl<T> PartialEq<SparseTensor<T>> for SparseTensor<T>where T: Number + PartialEq,
source§fn eq(&self, other: &SparseTensor<T>) -> bool
fn eq(&self, other: &SparseTensor<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.