pub struct SymCsrArray<T>{ /* private fields */ }
Expand description
Array-based SymCSR implementation compatible with SparseArray trait
Implementations§
Source§impl<T> SymCsrArray<T>
impl<T> SymCsrArray<T>
Sourcepub fn new(matrix: SymCsrMatrix<T>) -> Self
pub fn new(matrix: SymCsrMatrix<T>) -> Self
Sourcepub fn from_csr_array(array: &CsrArray<T>) -> SparseResult<Self>
pub fn from_csr_array(array: &CsrArray<T>) -> SparseResult<Self>
Sourcepub fn inner(&self) -> &SymCsrMatrix<T>
pub fn inner(&self) -> &SymCsrMatrix<T>
Sourcepub fn to_csr_array(&self) -> SparseResult<CsrArray<T>>
pub fn to_csr_array(&self) -> SparseResult<CsrArray<T>>
Trait Implementations§
Source§impl<T> Clone for SymCsrArray<T>
impl<T> Clone for SymCsrArray<T>
Source§fn clone(&self) -> SymCsrArray<T>
fn clone(&self) -> SymCsrArray<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Debug for SymCsrArray<T>
impl<T> Debug for SymCsrArray<T>
Source§impl<T> SparseArray<T> for SymCsrArray<T>
Implementation of SparseArray for SymCsrArray
impl<T> SparseArray<T> for SymCsrArray<T>
Implementation of SparseArray for SymCsrArray
Source§fn to_coo(&self) -> SparseResult<Box<dyn SparseArray<T>>>
fn to_coo(&self) -> SparseResult<Box<dyn SparseArray<T>>>
Returns a sparse array in COO format.
Source§fn to_csr(&self) -> SparseResult<Box<dyn SparseArray<T>>>
fn to_csr(&self) -> SparseResult<Box<dyn SparseArray<T>>>
Returns a sparse array in CSR format.
Source§fn set(&mut self, _i: usize, _j: usize, _value: T) -> SparseResult<()>
fn set(&mut self, _i: usize, _j: usize, _value: T) -> SparseResult<()>
Set a value at the specified position.
Source§fn dot_vector(&self, other: &ArrayView1<'_, T>) -> SparseResult<Array1<T>>
fn dot_vector(&self, other: &ArrayView1<'_, T>) -> SparseResult<Array1<T>>
Matrix-vector multiplication.
Source§fn copy(&self) -> Box<dyn SparseArray<T>>
fn copy(&self) -> Box<dyn SparseArray<T>>
Return a copy of the sparse array with the specified elements.
Source§fn sub(
&self,
other: &dyn SparseArray<T>,
) -> SparseResult<Box<dyn SparseArray<T>>>
fn sub( &self, other: &dyn SparseArray<T>, ) -> SparseResult<Box<dyn SparseArray<T>>>
Element-wise subtraction.
Source§fn div(
&self,
other: &dyn SparseArray<T>,
) -> SparseResult<Box<dyn SparseArray<T>>>
fn div( &self, other: &dyn SparseArray<T>, ) -> SparseResult<Box<dyn SparseArray<T>>>
Element-wise division.
Source§fn eliminate_zeros(&mut self)
fn eliminate_zeros(&mut self)
Eliminate zeros from the sparse array.
Source§fn sort_indices(&mut self)
fn sort_indices(&mut self)
Sort indices of the sparse array.
Source§fn sorted_indices(&self) -> Box<dyn SparseArray<T>>
fn sorted_indices(&self) -> Box<dyn SparseArray<T>>
Return a sorted copy of this sparse array.
Source§fn has_sorted_indices(&self) -> bool
fn has_sorted_indices(&self) -> bool
Check if indices are sorted.
Source§fn sum(&self, axis: Option<usize>) -> SparseResult<SparseSum<T>>
fn sum(&self, axis: Option<usize>) -> SparseResult<SparseSum<T>>
Sum the sparse array elements. Read more
Source§fn slice(
&self,
rows: (usize, usize),
cols: (usize, usize),
) -> SparseResult<Box<dyn SparseArray<T>>>
fn slice( &self, rows: (usize, usize), cols: (usize, usize), ) -> SparseResult<Box<dyn SparseArray<T>>>
Return a slice of the sparse array.
Source§fn find(&self) -> (Array1<usize>, Array1<usize>, Array1<T>)
fn find(&self) -> (Array1<usize>, Array1<usize>, Array1<T>)
Return the indices and values of the nonzero elements.
Source§fn add(
&self,
other: &dyn SparseArray<T>,
) -> SparseResult<Box<dyn SparseArray<T>>>
fn add( &self, other: &dyn SparseArray<T>, ) -> SparseResult<Box<dyn SparseArray<T>>>
Element-wise addition.
Source§fn mul(
&self,
other: &dyn SparseArray<T>,
) -> SparseResult<Box<dyn SparseArray<T>>>
fn mul( &self, other: &dyn SparseArray<T>, ) -> SparseResult<Box<dyn SparseArray<T>>>
Element-wise multiplication.
Source§fn dot(
&self,
other: &dyn SparseArray<T>,
) -> SparseResult<Box<dyn SparseArray<T>>>
fn dot( &self, other: &dyn SparseArray<T>, ) -> SparseResult<Box<dyn SparseArray<T>>>
Matrix multiplication.
Source§fn transpose(&self) -> SparseResult<Box<dyn SparseArray<T>>>
fn transpose(&self) -> SparseResult<Box<dyn SparseArray<T>>>
Transpose the sparse array.
Source§fn to_csc(&self) -> SparseResult<Box<dyn SparseArray<T>>>
fn to_csc(&self) -> SparseResult<Box<dyn SparseArray<T>>>
Returns a sparse array in CSC format.
Source§fn to_dia(&self) -> SparseResult<Box<dyn SparseArray<T>>>
fn to_dia(&self) -> SparseResult<Box<dyn SparseArray<T>>>
Returns a sparse array in DIA format.
Source§fn to_dok(&self) -> SparseResult<Box<dyn SparseArray<T>>>
fn to_dok(&self) -> SparseResult<Box<dyn SparseArray<T>>>
Returns a sparse array in DOK format.
Source§fn to_lil(&self) -> SparseResult<Box<dyn SparseArray<T>>>
fn to_lil(&self) -> SparseResult<Box<dyn SparseArray<T>>>
Returns a sparse array in LIL format.
Source§fn to_bsr(&self) -> SparseResult<Box<dyn SparseArray<T>>>
fn to_bsr(&self) -> SparseResult<Box<dyn SparseArray<T>>>
Returns a sparse array in BSR format.
Source§impl<T> SymSparseArray<T> for SymCsrArray<T>
Implementation of SymSparseArray for SymCsrArray
impl<T> SymSparseArray<T> for SymCsrArray<T>
Implementation of SymSparseArray for SymCsrArray
Source§fn nnz_stored(&self) -> usize
fn nnz_stored(&self) -> usize
Get the number of stored non-zero elements Read more
Source§fn to_sym_csr(&self) -> SparseResult<SymCsrArray<T>>
fn to_sym_csr(&self) -> SparseResult<SymCsrArray<T>>
Convert to symmetric CSR array Read more
Source§fn to_sym_coo(&self) -> SparseResult<SymCooArray<T>>
fn to_sym_coo(&self) -> SparseResult<SymCooArray<T>>
Convert to symmetric COO array Read more
Source§fn is_symmetric(&self) -> bool
fn is_symmetric(&self) -> bool
Check if the matrix is guaranteed to be symmetric Read more
Auto Trait Implementations§
impl<T> Freeze for SymCsrArray<T>
impl<T> RefUnwindSafe for SymCsrArray<T>where
T: RefUnwindSafe,
impl<T> Send for SymCsrArray<T>where
T: Send,
impl<T> Sync for SymCsrArray<T>where
T: Sync,
impl<T> Unpin for SymCsrArray<T>where
T: Unpin,
impl<T> UnwindSafe for SymCsrArray<T>where
T: UnwindSafe,
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,
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