pub struct Spectrum<C = TofIndex> { /* private fields */ }Expand description
An MS2 spectrum with centroided mz values and summed intensities.
Implementations§
Source§impl<C> Spectrum<C>
impl<C> Spectrum<C>
pub fn new( intensities: Vec<f64>, index: usize, precursor: Option<Precursor>, coordinates: Vec<C>, isolation_window: IsolationWindow, ) -> Self
pub fn intensities(&self) -> &Vec<f64>
pub fn precursor(&self) -> &Option<Precursor>
pub fn index(&self) -> usize
pub fn isolation_window(&self) -> &IsolationWindow
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn coordinates(&self) -> &Vec<C>
pub fn convert_to<X>(self, converter: impl Converter<C, X>) -> Spectrum<X>where
C: Copy,
pub fn get_top_n(&self, n: usize) -> Selfwhere
C: Clone,
Trait Implementations§
Source§impl<C: PartialEq> PartialEq for Spectrum<C>
impl<C: PartialEq> PartialEq for Spectrum<C>
impl<C> StructuralPartialEq for Spectrum<C>
Auto Trait Implementations§
impl<C> Freeze for Spectrum<C>
impl<C> RefUnwindSafe for Spectrum<C>where
C: RefUnwindSafe,
impl<C> Send for Spectrum<C>where
C: Send,
impl<C> Sync for Spectrum<C>where
C: Sync,
impl<C> Unpin for Spectrum<C>where
C: Unpin,
impl<C> UnsafeUnpin for Spectrum<C>
impl<C> UnwindSafe for Spectrum<C>where
C: 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
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