#[repr(transparent)]pub struct SymbolicSparseRowMat<Inner>(pub Inner);Expand description
generic SymbolicSparseRowMat wrapper
Tuple Fields§
§0: InnerImplementations§
Source§impl<Inner> SymbolicSparseRowMat<Inner>
impl<Inner> SymbolicSparseRowMat<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> SymbolicSparseRowMat<Ref<'a, I, Rows, Cols>>
impl<'a, Rows: Shape, Cols: Shape, I: Index> SymbolicSparseRowMat<Ref<'a, I, Rows, Cols>>
Sourcepub unsafe fn new_unchecked(
nrows: Rows,
ncols: Cols,
row_ptr: &'a [I],
row_nnz: Option<&'a [I]>,
col_idx: &'a [I],
) -> Self
pub unsafe fn new_unchecked( nrows: Rows, ncols: Cols, row_ptr: &'a [I], row_nnz: Option<&'a [I]>, col_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,
row_ptr: &'a [I],
row_nnz: Option<&'a [I]>,
col_idx: &'a [I],
) -> Self
pub fn new_checked( nrows: Rows, ncols: Cols, row_ptr: &'a [I], row_nnz: Option<&'a [I]>, col_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,
row_ptr: &'a [I],
row_nnz: Option<&'a [I]>,
col_idx: &'a [I],
) -> Self
pub fn new_unsorted_checked( nrows: Rows, ncols: Cols, row_ptr: &'a [I], row_nnz: Option<&'a [I]>, col_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
- row pointers
- row non-zero counts
- column 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) -> SymbolicSparseColMatRef<'a, I, Cols, Rows>
pub fn transpose(self) -> SymbolicSparseColMatRef<'a, I, Cols, Rows>
returns a view over the transpose of self
Sourcepub fn to_owned(&self) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
pub fn to_owned(&self) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
returns a newly allocated matrix holding the values of self
Sourcepub fn to_col_major(
&self,
) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
pub fn to_col_major( &self, ) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
returns a newly allocated matrix holding the values of self in column 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 row_range(&self, i: Idx<Rows>) -> Range<usize>
pub fn row_range(&self, i: Idx<Rows>) -> Range<usize>
returns the range specifying the indices of row i
Sourcepub unsafe fn row_range_unchecked(&self, i: Idx<Rows>) -> Range<usize>
pub unsafe fn row_range_unchecked(&self, i: Idx<Rows>) -> Range<usize>
returns the range specifying the indices of row i, without bound checks
Sourcepub fn col_idx_of_row_raw(&self, i: Idx<Rows>) -> &'a [Idx<Cols, I>] ⓘ
pub fn col_idx_of_row_raw(&self, i: Idx<Rows>) -> &'a [Idx<Cols, I>] ⓘ
returns the column indices of row i
Sourcepub fn col_idx_of_row(
&self,
i: Idx<Rows>,
) -> impl 'a + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Cols>>where
Rows: 'a,
Cols: 'a,
pub fn col_idx_of_row(
&self,
i: Idx<Rows>,
) -> impl 'a + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Cols>>where
Rows: 'a,
Cols: 'a,
returns the column indices of row i
Sourcepub fn as_shape<V: Shape, H: Shape>(
self,
nrows: V,
ncols: H,
) -> SymbolicSparseRowMatRef<'a, I, V, H>
pub fn as_shape<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SymbolicSparseRowMatRef<'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) -> SymbolicSparseRowMatRef<'a, I>
pub fn as_dyn(self) -> SymbolicSparseRowMatRef<'a, I>
returns the input matrix with dynamic shape
Sourcepub fn as_ref(self) -> SymbolicSparseRowMatRef<'a, I, Rows, Cols>
pub fn as_ref(self) -> SymbolicSparseRowMatRef<'a, I, Rows, Cols>
Returns a view over the symbolic structure of self.
Source§impl<Rows: Shape, Cols: Shape, I: Index> SymbolicSparseRowMat<Own<I, Rows, Cols>>
impl<Rows: Shape, Cols: Shape, I: Index> SymbolicSparseRowMat<Own<I, Rows, Cols>>
Sourcepub unsafe fn new_unchecked(
nrows: Rows,
ncols: Cols,
row_ptr: Vec<I>,
row_nnz: Option<Vec<I>>,
col_idx: Vec<I>,
) -> Self
pub unsafe fn new_unchecked( nrows: Rows, ncols: Cols, row_ptr: Vec<I>, row_nnz: Option<Vec<I>>, col_idx: Vec<I>, ) -> Self
Sourcepub fn new_checked(
nrows: Rows,
ncols: Cols,
row_ptr: Vec<I>,
row_nnz: Option<Vec<I>>,
col_idx: Vec<I>,
) -> Self
pub fn new_checked( nrows: Rows, ncols: Cols, row_ptr: Vec<I>, row_nnz: Option<Vec<I>>, col_idx: Vec<I>, ) -> Self
Sourcepub fn new_unsorted_checked(
nrows: Rows,
ncols: Cols,
row_ptr: Vec<I>,
row_nnz: Option<Vec<I>>,
col_idx: Vec<I>,
) -> Self
pub fn new_unsorted_checked( nrows: Rows, ncols: Cols, row_ptr: Vec<I>, row_nnz: Option<Vec<I>>, col_idx: Vec<I>, ) -> Self
Sourcepub fn shape(&self) -> (Rows, Cols)
pub fn shape(&self) -> (Rows, Cols)
Sourcepub fn transpose(&self) -> SymbolicSparseColMatRef<'_, I, Cols, Rows>
pub fn transpose(&self) -> SymbolicSparseColMatRef<'_, I, Cols, Rows>
Sourcepub fn into_transpose(self) -> SymbolicSparseColMat<I, Cols, Rows>
pub fn into_transpose(self) -> SymbolicSparseColMat<I, Cols, Rows>
Sourcepub fn to_owned(&self) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
pub fn to_owned(&self) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
Sourcepub fn to_col_major(
&self,
) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
pub fn to_col_major( &self, ) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
Sourcepub fn compute_nnz(&self) -> usize
pub fn compute_nnz(&self) -> usize
Sourcepub unsafe fn row_range_unchecked(&self, i: Idx<Rows>) -> Range<usize>
pub unsafe fn row_range_unchecked(&self, i: Idx<Rows>) -> Range<usize>
Sourcepub fn col_idx_of_row_raw(&self, i: Idx<Rows>) -> &[Idx<Cols, I>] ⓘ
pub fn col_idx_of_row_raw(&self, i: Idx<Rows>) -> &[Idx<Cols, I>] ⓘ
Sourcepub fn col_idx_of_row(
&self,
i: Idx<Rows>,
) -> impl '_ + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Cols>>
pub fn col_idx_of_row( &self, i: Idx<Rows>, ) -> impl '_ + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Cols>>
Sourcepub fn as_shape<V: Shape, H: Shape>(
&self,
nrows: V,
ncols: H,
) -> SymbolicSparseRowMatRef<'_, I, V, H>
pub fn as_shape<V: Shape, H: Shape>( &self, nrows: V, ncols: H, ) -> SymbolicSparseRowMatRef<'_, I, V, H>
Sourcepub fn into_shape<V: Shape, H: Shape>(
self,
nrows: V,
ncols: H,
) -> SymbolicSparseRowMat<I, V, H>
pub fn into_shape<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SymbolicSparseRowMat<I, V, H>
Sourcepub fn as_dyn(&self) -> SymbolicSparseRowMatRef<'_, I>
pub fn as_dyn(&self) -> SymbolicSparseRowMatRef<'_, I>
Sourcepub fn into_dyn(self) -> SymbolicSparseRowMat<I>
pub fn into_dyn(self) -> SymbolicSparseRowMat<I>
Sourcepub fn as_ref(&self) -> SymbolicSparseRowMatRef<'_, I, Rows, Cols>
pub fn as_ref(&self) -> SymbolicSparseRowMatRef<'_, 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 SymbolicSparseRowMat<Inner>
impl<Inner: Clone> Clone for SymbolicSparseRowMat<Inner>
Source§fn clone(&self) -> SymbolicSparseRowMat<Inner>
fn clone(&self) -> SymbolicSparseRowMat<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 SymbolicSparseRowMat<Inner>
impl<Inner: Debug> Debug for SymbolicSparseRowMat<Inner>
Source§impl<Inner> Deref for SymbolicSparseRowMat<Inner>
impl<Inner> Deref for SymbolicSparseRowMat<Inner>
Source§impl<Inner> DerefMut for SymbolicSparseRowMat<Inner>
impl<Inner> DerefMut for SymbolicSparseRowMat<Inner>
Source§impl<Inner: IntoConst> IntoConst for SymbolicSparseRowMat<Inner>
impl<Inner: IntoConst> IntoConst for SymbolicSparseRowMat<Inner>
type Target = SymbolicSparseRowMat<<Inner as IntoConst>::Target>
fn into_const(self) -> Self::Target
Source§impl<'short, Inner: Reborrow<'short>> Reborrow<'short> for SymbolicSparseRowMat<Inner>
impl<'short, Inner: Reborrow<'short>> Reborrow<'short> for SymbolicSparseRowMat<Inner>
Source§impl<'short, Inner: ReborrowMut<'short>> ReborrowMut<'short> for SymbolicSparseRowMat<Inner>
impl<'short, Inner: ReborrowMut<'short>> ReborrowMut<'short> for SymbolicSparseRowMat<Inner>
type Target = SymbolicSparseRowMat<<Inner as ReborrowMut<'short>>::Target>
fn rb_mut(&'short mut self) -> Self::Target
impl<Inner: Copy> Copy for SymbolicSparseRowMat<Inner>
Auto Trait Implementations§
impl<Inner> Freeze for SymbolicSparseRowMat<Inner>where
Inner: Freeze,
impl<Inner> RefUnwindSafe for SymbolicSparseRowMat<Inner>where
Inner: RefUnwindSafe,
impl<Inner> Send for SymbolicSparseRowMat<Inner>where
Inner: Send,
impl<Inner> Sync for SymbolicSparseRowMat<Inner>where
Inner: Sync,
impl<Inner> Unpin for SymbolicSparseRowMat<Inner>where
Inner: Unpin,
impl<Inner> UnwindSafe for SymbolicSparseRowMat<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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R> Rng for R
impl<R> Rng for R
Source§fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
StandardUniform distribution. Read moreSource§fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
Source§fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
Source§fn random_bool(&mut self, p: f64) -> bool
fn random_bool(&mut self, p: f64) -> bool
p of being true. Read moreSource§fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
numerator/denominator of being
true. Read moreSource§fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
Source§fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
Source§fn gen<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn gen<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
random to avoid conflict with the new gen keyword in Rust 2024.Rng::random.Source§fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
random_rangeRng::random_range.Source§impl<R> TryRngCore for R
impl<R> TryRngCore for R
Source§type Error = Infallible
type Error = Infallible
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
u64.Source§fn try_fill_bytes(
&mut self,
dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
dest entirely with random data.Source§fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
UnwrapMut wrapper.Source§fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
Self: Sized,
fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
Self: Sized,
RngCore to a RngReadAdapter.