pub struct ExprMatrix { /* private fields */ }Expand description
An expression matrix with named rows (features/genes) and columns (samples).
Element (row i, col j) is stored at data[i * ncol + j]. Missing values
are represented as f64::NAN (the analog of R’s NA).
Implementations§
Source§impl ExprMatrix
impl ExprMatrix
Sourcepub fn new(
row_names: Vec<String>,
col_names: Vec<String>,
data: Vec<f64>,
) -> ExprMatrix
pub fn new( row_names: Vec<String>, col_names: Vec<String>, data: Vec<f64>, ) -> ExprMatrix
Build a matrix from row names, column names, and row-major data.
Panics if data.len() != row_names.len() * col_names.len().
Sourcepub fn row_of(&self, name: &str) -> Option<usize>
pub fn row_of(&self, name: &str) -> Option<usize>
First row index for a feature name, if present.
Trait Implementations§
Source§impl Clone for ExprMatrix
impl Clone for ExprMatrix
Source§fn clone(&self) -> ExprMatrix
fn clone(&self) -> ExprMatrix
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExprMatrix
impl RefUnwindSafe for ExprMatrix
impl Send for ExprMatrix
impl Sync for ExprMatrix
impl Unpin for ExprMatrix
impl UnsafeUnpin for ExprMatrix
impl UnwindSafe for ExprMatrix
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