Struct mzpeaks::feature::ChargedFeature
source · pub struct ChargedFeature<X, Y> {
pub feature: Feature<X, Y>,
pub charge: i32,
}
Fields§
§feature: Feature<X, Y>
§charge: i32
Implementations§
source§impl<X, Y> ChargedFeature<X, Y>
impl<X, Y> ChargedFeature<X, Y>
pub fn new(feature: Feature<X, Y>, charge: i32) -> Self
pub fn empty(charge: i32) -> Self
pub fn iter(&self) -> Iter<'_, X, Y> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, X, Y> ⓘ
pub fn push<T: CoordinateLike<X> + IntensityMeasurement>( &mut self, pt: &T, time: f64 )
pub fn push_raw(&mut self, x: f64, y: f64, z: f32)
sourcepub unsafe fn push_raw_unchecked(&mut self, x: f64, y: f64, z: f32)
pub unsafe fn push_raw_unchecked(&mut self, x: f64, y: f64, z: f32)
§Safety
This method does not enforce the sorting over Y dimension. Use it only if you do not need to maintain that invariant or intend to sort later.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
source§impl<Y> ChargedFeature<Mass, Y>
impl<Y> ChargedFeature<Mass, Y>
pub fn iter_peaks(&self) -> DeconvolutedPeakIter<'_, Y> ⓘ
Trait Implementations§
source§impl<X, Y> AsMut<Feature<X, Y>> for ChargedFeature<X, Y>
impl<X, Y> AsMut<Feature<X, Y>> for ChargedFeature<X, Y>
source§impl<X, Y> AsRef<Feature<X, Y>> for ChargedFeature<X, Y>
impl<X, Y> AsRef<Feature<X, Y>> for ChargedFeature<X, Y>
source§impl<X: Clone, Y: Clone> Clone for ChargedFeature<X, Y>
impl<X: Clone, Y: Clone> Clone for ChargedFeature<X, Y>
source§fn clone(&self) -> ChargedFeature<X, Y>
fn clone(&self) -> ChargedFeature<X, Y>
Returns a copy 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<Y> CoordinateLike<MZ> for ChargedFeature<Mass, Y>
impl<Y> CoordinateLike<MZ> for ChargedFeature<Mass, Y>
source§fn coordinate(&self) -> f64
fn coordinate(&self) -> f64
The trait method for accessing the coordinate of the object on coordinate
system
T
source§impl<X, Y> CoordinateLike<X> for ChargedFeature<X, Y>
impl<X, Y> CoordinateLike<X> for ChargedFeature<X, Y>
source§fn coordinate(&self) -> f64
fn coordinate(&self) -> f64
The trait method for accessing the coordinate of the object on coordinate
system
T
source§impl<X: Default, Y: Default> Default for ChargedFeature<X, Y>
impl<X: Default, Y: Default> Default for ChargedFeature<X, Y>
source§fn default() -> ChargedFeature<X, Y>
fn default() -> ChargedFeature<X, Y>
Returns the “default value” for a type. Read more
source§impl<P: CoordinateLike<X> + IntensityMeasurement, X, Y> Extend<(P, f64)> for ChargedFeature<X, Y>
impl<P: CoordinateLike<X> + IntensityMeasurement, X, Y> Extend<(P, f64)> for ChargedFeature<X, Y>
source§fn extend<T: IntoIterator<Item = (P, f64)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (P, f64)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<X, Y> Extend<(f64, f64, f32)> for ChargedFeature<X, Y>
impl<X, Y> Extend<(f64, f64, f32)> for ChargedFeature<X, Y>
source§fn extend<T: IntoIterator<Item = (f64, f64, f32)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (f64, f64, f32)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<X, Y> FeatureLike<X, Y> for ChargedFeature<X, Y>where
Feature<X, Y>: FeatureLike<X, Y>,
impl<X, Y> FeatureLike<X, Y> for ChargedFeature<X, Y>where
Feature<X, Y>: FeatureLike<X, Y>,
source§impl<X, Y> FeatureLikeMut<X, Y> for ChargedFeature<X, Y>where
Feature<X, Y>: FeatureLikeMut<X, Y>,
impl<X, Y> FeatureLikeMut<X, Y> for ChargedFeature<X, Y>where
Feature<X, Y>: FeatureLikeMut<X, Y>,
source§fn iter_mut(&mut self) -> impl Iterator<Item = (&mut f64, &mut f64, &mut f32)>
fn iter_mut(&mut self) -> impl Iterator<Item = (&mut f64, &mut f64, &mut f32)>
Create an iterator that yields (x, y, intensity) mutable references
source§fn push<T: CoordinateLike<X> + IntensityMeasurement>(
&mut self,
pt: &T,
time: f64
)
fn push<T: CoordinateLike<X> + IntensityMeasurement>( &mut self, pt: &T, time: f64 )
Add a new peak-like reference to the feature at a given y “time” coordinate. If the “time”
is not in sorted order, it should automatically re-sort.
source§impl<X, Y, P: CoordinateLike<X> + IntensityMeasurement + KnownCharge> FromIterator<(P, f64)> for ChargedFeature<X, Y>
impl<X, Y, P: CoordinateLike<X> + IntensityMeasurement + KnownCharge> FromIterator<(P, f64)> for ChargedFeature<X, Y>
source§impl<X, Y> IntensityMeasurement for ChargedFeature<X, Y>
impl<X, Y> IntensityMeasurement for ChargedFeature<X, Y>
source§impl<X, Y> KnownCharge for ChargedFeature<X, Y>
impl<X, Y> KnownCharge for ChargedFeature<X, Y>
source§impl<X, Y> PartialEq for ChargedFeature<X, Y>
impl<X, Y> PartialEq for ChargedFeature<X, Y>
source§impl<X, Y> PartialOrd for ChargedFeature<X, Y>
impl<X, Y> PartialOrd for ChargedFeature<X, Y>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a, X, Y> SplittableFeatureLike<'a, X, Y> for ChargedFeature<X, Y>
impl<'a, X, Y> SplittableFeatureLike<'a, X, Y> for ChargedFeature<X, Y>
source§impl<X, Y> TimeInterval<Y> for ChargedFeature<X, Y>where
Feature<X, Y>: TimeInterval<Y>,
impl<X, Y> TimeInterval<Y> for ChargedFeature<X, Y>where
Feature<X, Y>: TimeInterval<Y>,
source§fn apex_time(&self) -> Option<f64>
fn apex_time(&self) -> Option<f64>
The time point where the feature reaches its greatest intensity
source§fn start_time(&self) -> Option<f64>
fn start_time(&self) -> Option<f64>
The earliest time point recorded
source§fn find_time(&self, time: f64) -> (Option<usize>, f64)
fn find_time(&self, time: f64) -> (Option<usize>, f64)
Find the position in the interval closest to the requested time
and the magnitude of the error
source§fn as_range(&self) -> CoordinateRange<T>
fn as_range(&self) -> CoordinateRange<T>
Represent the
TimeInterval
into a CoordinateRange
Auto Trait Implementations§
impl<X, Y> RefUnwindSafe for ChargedFeature<X, Y>where
X: RefUnwindSafe,
Y: RefUnwindSafe,
impl<X, Y> Send for ChargedFeature<X, Y>
impl<X, Y> Sync for ChargedFeature<X, Y>
impl<X, Y> Unpin for ChargedFeature<X, Y>
impl<X, Y> UnwindSafe for ChargedFeature<X, Y>where
X: UnwindSafe,
Y: 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