Enum RefPeakDataLevel

Source
pub enum RefPeakDataLevel<'a, C, D>{
    Missing,
    RawData(&'a BinaryArrayMap),
    Centroid(&'a PeakSetVec<C, MZ>),
    Deconvoluted(&'a PeakSetVec<D, Mass>),
}
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 PeakSetVec<C, MZ>)

§

Deconvoluted(&'a PeakSetVec<D, Mass>)

Implementations§

Source§

impl<C, D> RefPeakDataLevel<'_, C, D>

Source

pub fn base_peak(&self) -> CentroidPeak

Compute the base peak of a spectrum

Source

pub fn mz_range(&self) -> (f64, f64)

Find the minimum and maximum m/z values of a spectrum

Source

pub fn tic(&self) -> f32

Compute the total ion current for a spectrum

Source

pub fn search(&self, query: f64, error_tolerance: Tolerance) -> Option<usize>

Source

pub fn len(&self) -> usize

Find the number of points in a profile spectrum, or the number of peaks for a centroid spectrum

Source

pub fn is_empty(&self) -> bool

Check if the collection is empty

Source

pub fn iter(&self) -> PeakDataIterDispatch<'_, C, D>

Iterate over MZPoint data encoded in the peak data.

NOTE: Values are produced in the order they are stored, so the data are not guaranteed to be ordered by m/z.

Source

pub fn get(&self, i: usize) -> Option<MZPoint>

Get the ith point in the peak data.

NOTE: There is no guarantee that values are stored in m/z order.

Source

pub fn fetch_summaries(&self) -> SpectrumSummary

Compute summary information about the peak data’s m/z range, base peak, total ion current, and number of data points

Source§

impl<C, D> RefPeakDataLevel<'_, C, D>

Source

pub fn cloned(&self) -> PeakDataLevel<C, D>

Trait Implementations§

Source§

impl<'a, C, D> Debug for RefPeakDataLevel<'a, C, D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, C, D> Freeze for RefPeakDataLevel<'a, C, D>

§

impl<'a, C, D> RefUnwindSafe for RefPeakDataLevel<'a, C, D>

§

impl<'a, C, D> Send for RefPeakDataLevel<'a, C, D>
where C: Sync, D: Sync,

§

impl<'a, C, D> Sync for RefPeakDataLevel<'a, C, D>
where C: Sync, D: Sync,

§

impl<'a, C, D> Unpin for RefPeakDataLevel<'a, C, D>

§

impl<'a, C, D> UnwindSafe for RefPeakDataLevel<'a, C, D>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.