pub struct SparseMatrixRef<'a, T, N, I> {
pub maj_ind: &'a [N],
pub min_ind: &'a [I],
pub val: &'a [T],
pub n_rows: usize,
pub n_cols: usize,
}Expand description
A lightweight reference-based representation of a sparse matrix (CSR or CSC).
This structure is designed to be agnostic of the underlying container and can be easily used with raw vectors from other crates or FFI (like PyO3).
Fields§
§maj_ind: &'a [N]Major indices (e.g., indptr in CSR/CSC)
min_ind: &'a [I]Minor indices (e.g., column indices in CSR, row indices in CSC)
val: &'a [T]The actual values in the matrix
n_rows: usizeNumber of rows in the matrix
n_cols: usizeNumber of columns in the matrix
Implementations§
Source§impl<'a, T, N, I> SparseMatrixRef<'a, T, N, I>
impl<'a, T, N, I> SparseMatrixRef<'a, T, N, I>
Trait Implementations§
Source§impl<'a, T: Clone, N: Clone, I: Clone> Clone for SparseMatrixRef<'a, T, N, I>
impl<'a, T: Clone, N: Clone, I: Clone> Clone for SparseMatrixRef<'a, T, N, I>
Source§fn clone(&self) -> SparseMatrixRef<'a, T, N, I>
fn clone(&self) -> SparseMatrixRef<'a, T, N, I>
Returns a duplicate 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<'a, T, N, I> MatrixStatTests<T> for SparseMatrixRef<'a, T, N, I>where
T: FloatOpsTS,
N: AsPrimitive<usize> + Send + Sync,
I: AsPrimitive<usize> + Send + Sync,
f64: From<T>,
impl<'a, T, N, I> MatrixStatTests<T> for SparseMatrixRef<'a, T, N, I>where
T: FloatOpsTS,
N: AsPrimitive<usize> + Send + Sync,
I: AsPrimitive<usize> + Send + Sync,
f64: From<T>,
Source§fn t_test(
&self,
group1_indices: &[usize],
group2_indices: &[usize],
test_type: TTestType,
) -> Result<Vec<TestResult<f64>>>
fn t_test( &self, group1_indices: &[usize], group2_indices: &[usize], test_type: TTestType, ) -> Result<Vec<TestResult<f64>>>
Perform t-tests comparing two groups of cells for all genes.
Source§fn mann_whitney_test(
&self,
group1_indices: &[usize],
group2_indices: &[usize],
alternative: Alternative,
) -> Result<Vec<TestResult<f64>>>
fn mann_whitney_test( &self, group1_indices: &[usize], group2_indices: &[usize], alternative: Alternative, ) -> Result<Vec<TestResult<f64>>>
Perform Mann-Whitney U tests comparing two groups of cells for all genes.
Source§fn fisher_exact_test(
&self,
group1_indices: &[usize],
group2_indices: &[usize],
alternative: Alternative,
) -> Result<Vec<TestResult<T>>>
fn fisher_exact_test( &self, group1_indices: &[usize], group2_indices: &[usize], alternative: Alternative, ) -> Result<Vec<TestResult<T>>>
Perform Fisher’s Exact tests comparing expression frequency between two groups.
Source§fn differential_expression(
&self,
group_ids: &[usize],
test_method: TestMethod,
) -> Result<MultipleTestResults<f64>>
fn differential_expression( &self, group_ids: &[usize], test_method: TestMethod, ) -> Result<MultipleTestResults<f64>>
Comprehensive differential expression analysis with multiple testing correction.
impl<'a, T: Copy, N: Copy, I: Copy> Copy for SparseMatrixRef<'a, T, N, I>
Auto Trait Implementations§
impl<'a, T, N, I> Freeze for SparseMatrixRef<'a, T, N, I>
impl<'a, T, N, I> RefUnwindSafe for SparseMatrixRef<'a, T, N, I>
impl<'a, T, N, I> Send for SparseMatrixRef<'a, T, N, I>
impl<'a, T, N, I> Sync for SparseMatrixRef<'a, T, N, I>
impl<'a, T, N, I> Unpin for SparseMatrixRef<'a, T, N, I>
impl<'a, T, N, I> UnsafeUnpin for SparseMatrixRef<'a, T, N, I>
impl<'a, T, N, I> UnwindSafe for SparseMatrixRef<'a, T, N, I>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.