pub struct CooMatrix<'a> { /* private fields */ }Implementations§
Source§impl<'a> CooMatrix<'a>
impl<'a> CooMatrix<'a>
pub fn new( rows: usize, columns: usize, row_indices: &'a [u32], column_indices: &'a [u32], values: &'a [f32], index_base: IndexBase, ) -> Result<Self, SparseError>
pub const fn rows(&self) -> usize
pub const fn columns(&self) -> usize
pub const fn nnz(&self) -> usize
pub const fn row_indices(&self) -> &'a [u32]
pub const fn column_indices(&self) -> &'a [u32]
pub const fn values(&self) -> &'a [f32]
pub const fn index_base(&self) -> IndexBase
Sourcepub fn to_csr(self) -> Result<CsrMatrixOwned, SparseError>
pub fn to_csr(self) -> Result<CsrMatrixOwned, SparseError>
Convert COO to row-sorted CSR. Entries in the same row retain their original relative order, including duplicate coordinates.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CooMatrix<'a>
impl<'a> RefUnwindSafe for CooMatrix<'a>
impl<'a> Send for CooMatrix<'a>
impl<'a> Sync for CooMatrix<'a>
impl<'a> Unpin for CooMatrix<'a>
impl<'a> UnsafeUnpin for CooMatrix<'a>
impl<'a> UnwindSafe for CooMatrix<'a>
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