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>

source

pub fn new(feature: Feature<X, Y>, charge: i32) -> Self

source

pub fn empty(charge: i32) -> Self

source

pub fn iter(&self) -> Iter<'_, X, Y>

source

pub fn iter_mut(&mut self) -> IterMut<'_, X, Y>

source

pub fn push<T: CoordinateLike<X> + IntensityMeasurement>( &mut self, pt: &T, time: f64 )

source

pub fn push_raw(&mut self, x: f64, y: f64, z: f32)

source

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.

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source§

impl<Y> ChargedFeature<Mass, Y>

source

pub fn iter_peaks(&self) -> DeconvolutedPeakIter<'_, Y>

Trait Implementations§

source§

impl<X, Y> AsMut<Feature<X, Y>> for ChargedFeature<X, Y>

source§

fn as_mut(&mut self) -> &mut Feature<X, Y>

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<X, Y> AsRef<Feature<X, Y>> for ChargedFeature<X, Y>

source§

fn as_ref(&self) -> &Feature<X, Y>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<X: Clone, Y: Clone> Clone for ChargedFeature<X, Y>

source§

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)

Performs copy-assignment from source. Read more
source§

impl<Y> CoordinateLike<MZ> for ChargedFeature<Mass, Y>

source§

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>

source§

fn coordinate(&self) -> f64

The trait method for accessing the coordinate of the object on coordinate system T
source§

impl<X: Debug, Y: Debug> Debug for ChargedFeature<X, Y>

source§

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

Formats the value using the given formatter. Read more
source§

impl<X: Default, Y: Default> Default for ChargedFeature<X, Y>

source§

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>

source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

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>

source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

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>,

source§

fn len(&self) -> usize

The number of points in the feature
source§

fn iter(&self) -> impl Iterator<Item = (&f64, &f64, &f32)>

Create an iterator that yields (x, y, intensity) references
source§

fn is_empty(&self) -> bool

Check if the feature has any points in it
source§

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)>

Create an iterator that yields (x, y, intensity) mutable references
source§

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§

fn push_raw(&mut self, x: f64, y: f64, z: f32)

As FeatureLikeMut::push, but instead add raw values instead of deriving them from a peak-like reference.
source§

impl<X, Y, P: CoordinateLike<X> + IntensityMeasurement + KnownCharge> FromIterator<(P, f64)> for ChargedFeature<X, Y>

source§

fn from_iter<T: IntoIterator<Item = (P, f64)>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl<X, Y> IntensityMeasurement for ChargedFeature<X, Y>

source§

fn intensity(&self) -> f32

source§

impl<X, Y> KnownCharge for ChargedFeature<X, Y>

source§

fn charge(&self) -> i32

source§

impl<X, Y> PartialEq for ChargedFeature<X, Y>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<X, Y> PartialOrd for ChargedFeature<X, Y>

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a, X, Y> SplittableFeatureLike<'a, X, Y> for ChargedFeature<X, Y>

§

type ViewType = ChargedFeatureView<'a, X, Y>

source§

fn split_at(&'a self, point: f64) -> (Self::ViewType, Self::ViewType)

source§

impl<X, Y> TimeInterval<Y> for ChargedFeature<X, Y>
where Feature<X, Y>: TimeInterval<Y>,

source§

fn apex_time(&self) -> Option<f64>

The time point where the feature reaches its greatest intensity
source§

fn area(&self) -> f32

Integrate the feature in the time dimension
source§

fn end_time(&self) -> Option<f64>

The latest time point recorded
source§

fn start_time(&self) -> Option<f64>

The earliest time point recorded
source§

fn iter_time(&self) -> impl Iterator<Item = f64>

Return an iterator over the time dimension
source§

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>

Represent the TimeInterval into a CoordinateRange
source§

fn spans(&self, time: f64) -> bool

Check if a time point is spanned by TimeInterval

Auto Trait Implementations§

§

impl<X, Y> RefUnwindSafe for ChargedFeature<X, Y>

§

impl<X, Y> Send for ChargedFeature<X, Y>
where X: Send, Y: Send,

§

impl<X, Y> Sync for ChargedFeature<X, Y>
where X: Sync, Y: Sync,

§

impl<X, Y> Unpin for ChargedFeature<X, Y>
where X: Unpin, Y: Unpin,

§

impl<X, Y> UnwindSafe for ChargedFeature<X, Y>
where X: UnwindSafe, Y: UnwindSafe,

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> IonMobilityLocated for T

source§

impl<T> MZLocated for T
where T: CoordinateLike<MZ>,

source§

fn mz(&self) -> f64

source§

impl<T> MassLocated for T
where T: CoordinateLike<Mass>,

source§

impl<T> TimeLocated for T
where T: CoordinateLike<Time>,

source§

fn time(&self) -> f64

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.