Enum mzdata::spectrum::RefPeakDataLevel
source · pub enum RefPeakDataLevel<'a, C: CentroidLike, D: DeconvolutedCentroidLike> {
Missing,
RawData(&'a BinaryArrayMap),
Centroid(&'a MZPeakSetType<C>),
Deconvoluted(&'a MassPeakSetType<D>),
}
Expand description
An variant for dispatching to different strategies of computing common statistics of different levels of peak data.
Variants§
Missing
RawData(&'a BinaryArrayMap)
Centroid(&'a MZPeakSetType<C>)
Deconvoluted(&'a MassPeakSetType<D>)
Implementations§
source§impl<'a, C: CentroidLike, D: DeconvolutedCentroidLike> RefPeakDataLevel<'a, C, D>
impl<'a, C: CentroidLike, D: DeconvolutedCentroidLike> RefPeakDataLevel<'a, C, D>
sourcepub fn base_peak(&self) -> CentroidPeak
pub fn base_peak(&self) -> CentroidPeak
Compute the base peak of a spectrum
pub fn search(&self, query: f64, error_tolerance: Tolerance) -> Option<usize>
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Find the number of points in a profile spectrum, or the number of peaks for a centroid spectrum
pub fn fetch_summaries(&self) -> SpectrumSummary
source§impl<'a, C: CentroidLike + Clone, D: DeconvolutedCentroidLike + Clone> RefPeakDataLevel<'a, C, D>
impl<'a, C: CentroidLike + Clone, D: DeconvolutedCentroidLike + Clone> RefPeakDataLevel<'a, C, D>
pub fn cloned(&self) -> PeakDataLevel<C, D>
Trait Implementations§
source§impl<'a, C: Debug + CentroidLike, D: Debug + DeconvolutedCentroidLike> Debug for RefPeakDataLevel<'a, C, D>
impl<'a, C: Debug + CentroidLike, D: Debug + DeconvolutedCentroidLike> Debug for RefPeakDataLevel<'a, C, D>
Auto Trait Implementations§
impl<'a, C, D> Freeze for RefPeakDataLevel<'a, C, D>
impl<'a, C, D> RefUnwindSafe for RefPeakDataLevel<'a, C, D>where
C: RefUnwindSafe,
D: RefUnwindSafe,
impl<'a, C, D> Send for RefPeakDataLevel<'a, C, D>
impl<'a, C, D> Sync for RefPeakDataLevel<'a, C, D>
impl<'a, C, D> Unpin for RefPeakDataLevel<'a, C, D>
impl<'a, C, D> UnwindSafe for RefPeakDataLevel<'a, C, D>where
C: RefUnwindSafe,
D: RefUnwindSafe,
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> 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.