#[repr(transparent)]pub struct SymbolicSparseColMat<Inner>(pub Inner);Expand description
generic SymbolicSparseColMat wrapper
Tuple Fields§
§0: InnerImplementations§
Source§impl<Inner> SymbolicSparseColMat<Inner>
impl<Inner> SymbolicSparseColMat<Inner>
Sourcepub fn from_inner_ref(inner: &Inner) -> &Self
pub fn from_inner_ref(inner: &Inner) -> &Self
wrap by reference
Sourcepub fn from_inner_mut(inner: &mut Inner) -> &mut Self
pub fn from_inner_mut(inner: &mut Inner) -> &mut Self
wrap by mutable reference
Source§impl<'a, Rows: Shape, Cols: Shape, I: Index> SymbolicSparseColMat<Ref<'a, I, Rows, Cols>>
impl<'a, Rows: Shape, Cols: Shape, I: Index> SymbolicSparseColMat<Ref<'a, I, Rows, Cols>>
Sourcepub unsafe fn new_unchecked(
nrows: Rows,
ncols: Cols,
col_ptr: &'a [I],
col_nnz: Option<&'a [I]>,
row_idx: &'a [I],
) -> Self
pub unsafe fn new_unchecked( nrows: Rows, ncols: Cols, col_ptr: &'a [I], col_nnz: Option<&'a [I]>, row_idx: &'a [I], ) -> Self
creates a new symbolic matrix view without checking its invariants
§safety
see type level documentation.
Sourcepub fn new_checked(
nrows: Rows,
ncols: Cols,
col_ptr: &'a [I],
col_nnz: Option<&'a [I]>,
row_idx: &'a [I],
) -> Self
pub fn new_checked( nrows: Rows, ncols: Cols, col_ptr: &'a [I], col_nnz: Option<&'a [I]>, row_idx: &'a [I], ) -> Self
creates a new symbolic matrix view after checking its invariants
§safety
see type level documentation.
Sourcepub fn new_unsorted_checked(
nrows: Rows,
ncols: Cols,
col_ptr: &'a [I],
col_nnz: Option<&'a [I]>,
row_idx: &'a [I],
) -> Self
pub fn new_unsorted_checked( nrows: Rows, ncols: Cols, col_ptr: &'a [I], col_nnz: Option<&'a [I]>, row_idx: &'a [I], ) -> Self
creates a new symbolic matrix view after checking its invariants (excluding soft invariants)
§safety
see type level documentation.
Sourcepub fn parts(self) -> (Rows, Cols, &'a [I], Option<&'a [I]>, &'a [I])
pub fn parts(self) -> (Rows, Cols, &'a [I], Option<&'a [I]>, &'a [I])
returns the components of the sparse matrix
- number of rows
- number of columns
- column pointers
- column non-zero counts
- row indices
Sourcepub fn shape(&self) -> (Rows, Cols)
pub fn shape(&self) -> (Rows, Cols)
returns the number of rows and columns of the matrix
Sourcepub fn transpose(self) -> SymbolicSparseRowMatRef<'a, I, Cols, Rows>
pub fn transpose(self) -> SymbolicSparseRowMatRef<'a, I, Cols, Rows>
returns a view over the transpose of self
Sourcepub fn to_owned(&self) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
pub fn to_owned(&self) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
returns a newly allocated matrix holding the values of self
Sourcepub fn to_row_major(
&self,
) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
pub fn to_row_major( &self, ) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
returns a newly allocated matrix holding the values of self in row major format
Sourcepub fn compute_nnz(&self) -> usize
pub fn compute_nnz(&self) -> usize
returns the number of non-zero elements in the matrix
Sourcepub fn col_range(&self, j: Idx<Cols>) -> Range<usize>
pub fn col_range(&self, j: Idx<Cols>) -> Range<usize>
returns the range specifying the indices of column j
Sourcepub unsafe fn col_range_unchecked(&self, j: Idx<Cols>) -> Range<usize>
pub unsafe fn col_range_unchecked(&self, j: Idx<Cols>) -> Range<usize>
returns the range specifying the indices of column j, without bound checks
Sourcepub fn row_idx_of_col_raw(&self, j: Idx<Cols>) -> &'a [Idx<Rows, I>] ⓘ
pub fn row_idx_of_col_raw(&self, j: Idx<Cols>) -> &'a [Idx<Rows, I>] ⓘ
returns the row indices of column j
Sourcepub fn row_idx_of_col(
&self,
j: Idx<Cols>,
) -> impl 'a + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Rows>>where
Rows: 'a,
Cols: 'a,
pub fn row_idx_of_col(
&self,
j: Idx<Cols>,
) -> impl 'a + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Rows>>where
Rows: 'a,
Cols: 'a,
returns the row indices of column j
Sourcepub fn as_shape<V: Shape, H: Shape>(
self,
nrows: V,
ncols: H,
) -> SymbolicSparseColMatRef<'a, I, V, H>
pub fn as_shape<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SymbolicSparseColMatRef<'a, I, V, H>
returns the input matrix with the given shape after checking that it matches the current shape
Sourcepub fn as_dyn(self) -> SymbolicSparseColMatRef<'a, I>
pub fn as_dyn(self) -> SymbolicSparseColMatRef<'a, I>
returns the input matrix with dynamic shape
Sourcepub fn as_ref(self) -> SymbolicSparseColMatRef<'a, I, Rows, Cols>
pub fn as_ref(self) -> SymbolicSparseColMatRef<'a, I, Rows, Cols>
Returns a view over the symbolic structure of self.
Source§impl<Rows: Shape, Cols: Shape, I: Index> SymbolicSparseColMat<Own<I, Rows, Cols>>
impl<Rows: Shape, Cols: Shape, I: Index> SymbolicSparseColMat<Own<I, Rows, Cols>>
Sourcepub unsafe fn new_unchecked(
nrows: Rows,
ncols: Cols,
col_ptr: Vec<I>,
col_nnz: Option<Vec<I>>,
row_idx: Vec<I>,
) -> Self
pub unsafe fn new_unchecked( nrows: Rows, ncols: Cols, col_ptr: Vec<I>, col_nnz: Option<Vec<I>>, row_idx: Vec<I>, ) -> Self
creates a new symbolic matrix view without checking its invariants
§safety
see type level documentation.
Sourcepub fn new_checked(
nrows: Rows,
ncols: Cols,
col_ptr: Vec<I>,
col_nnz: Option<Vec<I>>,
row_idx: Vec<I>,
) -> Self
pub fn new_checked( nrows: Rows, ncols: Cols, col_ptr: Vec<I>, col_nnz: Option<Vec<I>>, row_idx: Vec<I>, ) -> Self
creates a new symbolic matrix view after checking its invariants
§safety
see type level documentation.
Sourcepub fn new_unsorted_checked(
nrows: Rows,
ncols: Cols,
col_ptr: Vec<I>,
col_nnz: Option<Vec<I>>,
row_idx: Vec<I>,
) -> Self
pub fn new_unsorted_checked( nrows: Rows, ncols: Cols, col_ptr: Vec<I>, col_nnz: Option<Vec<I>>, row_idx: Vec<I>, ) -> Self
creates a new symbolic matrix view after checking its invariants (excluding soft invariants)
§safety
see type level documentation.
Sourcepub fn shape(&self) -> (Rows, Cols)
pub fn shape(&self) -> (Rows, Cols)
returns the number of rows and columns of the matrix
Sourcepub fn transpose(&self) -> SymbolicSparseRowMatRef<'_, I, Cols, Rows>
pub fn transpose(&self) -> SymbolicSparseRowMatRef<'_, I, Cols, Rows>
returns a view over the transpose of self
Sourcepub fn into_transpose(self) -> SymbolicSparseRowMat<I, Cols, Rows>
pub fn into_transpose(self) -> SymbolicSparseRowMat<I, Cols, Rows>
returns the transpose of self
Sourcepub fn to_owned(&self) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
pub fn to_owned(&self) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
Sourcepub fn to_row_major(
&self,
) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
pub fn to_row_major( &self, ) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
Sourcepub fn compute_nnz(&self) -> usize
pub fn compute_nnz(&self) -> usize
Sourcepub unsafe fn col_range_unchecked(&self, j: Idx<Cols>) -> Range<usize>
pub unsafe fn col_range_unchecked(&self, j: Idx<Cols>) -> Range<usize>
Sourcepub fn row_idx_of_col_raw(&self, j: Idx<Cols>) -> &[Idx<Rows, I>] ⓘ
pub fn row_idx_of_col_raw(&self, j: Idx<Cols>) -> &[Idx<Rows, I>] ⓘ
Sourcepub fn row_idx_of_col(
&self,
j: Idx<Cols>,
) -> impl '_ + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Rows>>
pub fn row_idx_of_col( &self, j: Idx<Cols>, ) -> impl '_ + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Rows>>
Sourcepub fn as_shape<V: Shape, H: Shape>(
&self,
nrows: V,
ncols: H,
) -> SymbolicSparseColMatRef<'_, I, V, H>
pub fn as_shape<V: Shape, H: Shape>( &self, nrows: V, ncols: H, ) -> SymbolicSparseColMatRef<'_, I, V, H>
Sourcepub fn into_shape<V: Shape, H: Shape>(
self,
nrows: V,
ncols: H,
) -> SymbolicSparseColMat<I, V, H>
pub fn into_shape<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SymbolicSparseColMat<I, V, H>
Sourcepub fn as_dyn(&self) -> SymbolicSparseColMatRef<'_, I>
pub fn as_dyn(&self) -> SymbolicSparseColMatRef<'_, I>
Sourcepub fn into_dyn(self) -> SymbolicSparseColMat<I>
pub fn into_dyn(self) -> SymbolicSparseColMat<I>
Sourcepub fn as_ref(&self) -> SymbolicSparseColMatRef<'_, I, Rows, Cols>
pub fn as_ref(&self) -> SymbolicSparseColMatRef<'_, I, Rows, Cols>
Returns a view over the symbolic structure of self.
Sourcepub fn try_new_from_indices(
nrows: Rows,
ncols: Cols,
idx: &[Pair<Idx<Rows, I>, Idx<Cols, I>>],
) -> Result<(Self, Argsort<I>), CreationError>
pub fn try_new_from_indices( nrows: Rows, ncols: Cols, idx: &[Pair<Idx<Rows, I>, Idx<Cols, I>>], ) -> Result<(Self, Argsort<I>), CreationError>
create a new symbolic structure, and the corresponding order for the numerical values from pairs of indices
Sourcepub fn try_new_from_nonnegative_indices(
nrows: Rows,
ncols: Cols,
idx: &[Pair<MaybeIdx<Rows, I>, MaybeIdx<Cols, I>>],
) -> Result<(Self, Argsort<I>), CreationError>
pub fn try_new_from_nonnegative_indices( nrows: Rows, ncols: Cols, idx: &[Pair<MaybeIdx<Rows, I>, MaybeIdx<Cols, I>>], ) -> Result<(Self, Argsort<I>), CreationError>
create a new symbolic structure, and the corresponding order for the numerical values from pairs of indices
negative indices are ignored
Trait Implementations§
Source§impl<Inner: Clone> Clone for SymbolicSparseColMat<Inner>
impl<Inner: Clone> Clone for SymbolicSparseColMat<Inner>
Source§fn clone(&self) -> SymbolicSparseColMat<Inner>
fn clone(&self) -> SymbolicSparseColMat<Inner>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<Inner: Debug> Debug for SymbolicSparseColMat<Inner>
impl<Inner: Debug> Debug for SymbolicSparseColMat<Inner>
Source§impl<Inner> Deref for SymbolicSparseColMat<Inner>
impl<Inner> Deref for SymbolicSparseColMat<Inner>
Source§impl<Inner> DerefMut for SymbolicSparseColMat<Inner>
impl<Inner> DerefMut for SymbolicSparseColMat<Inner>
Source§impl<Inner: IntoConst> IntoConst for SymbolicSparseColMat<Inner>
impl<Inner: IntoConst> IntoConst for SymbolicSparseColMat<Inner>
type Target = SymbolicSparseColMat<<Inner as IntoConst>::Target>
fn into_const(self) -> Self::Target
Source§impl<'short, Inner: Reborrow<'short>> Reborrow<'short> for SymbolicSparseColMat<Inner>
impl<'short, Inner: Reborrow<'short>> Reborrow<'short> for SymbolicSparseColMat<Inner>
Source§impl<'short, Inner: ReborrowMut<'short>> ReborrowMut<'short> for SymbolicSparseColMat<Inner>
impl<'short, Inner: ReborrowMut<'short>> ReborrowMut<'short> for SymbolicSparseColMat<Inner>
type Target = SymbolicSparseColMat<<Inner as ReborrowMut<'short>>::Target>
fn rb_mut(&'short mut self) -> Self::Target
impl<Inner: Copy> Copy for SymbolicSparseColMat<Inner>
Auto Trait Implementations§
impl<Inner> Freeze for SymbolicSparseColMat<Inner>where
Inner: Freeze,
impl<Inner> RefUnwindSafe for SymbolicSparseColMat<Inner>where
Inner: RefUnwindSafe,
impl<Inner> Send for SymbolicSparseColMat<Inner>where
Inner: Send,
impl<Inner> Sync for SymbolicSparseColMat<Inner>where
Inner: Sync,
impl<Inner> Unpin for SymbolicSparseColMat<Inner>where
Inner: Unpin,
impl<Inner> UnwindSafe for SymbolicSparseColMat<Inner>where
Inner: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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>
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>
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