pub struct ChargedFeatureView<'a, X, Y> {
pub charge: i32,
/* private fields */
}Expand description
A non-owning version of ChargedFeature
Fields§
§charge: i32Implementations§
Source§impl<'a, X, Y> ChargedFeatureView<'a, X, Y>
impl<'a, X, Y> ChargedFeatureView<'a, X, Y>
pub fn new(feature: FeatureView<'a, X, Y>, charge: i32) -> Self
pub fn empty(charge: i32) -> Self
pub fn into_inner(self) -> (FeatureView<'a, X, Y>, i32)
pub fn as_inner(&self) -> (&FeatureView<'a, X, Y>, i32)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> Iter<'a, X, Y> ⓘ
pub fn to_owned(&self) -> ChargedFeature<X, Y>
Trait Implementations§
Source§impl<'a, X: Clone, Y: Clone> Clone for ChargedFeatureView<'a, X, Y>
impl<'a, X: Clone, Y: Clone> Clone for ChargedFeatureView<'a, X, Y>
Source§fn clone(&self) -> ChargedFeatureView<'a, X, Y>
fn clone(&self) -> ChargedFeatureView<'a, X, Y>
Returns a duplicate 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<X, Y> CoordinateLike<X> for ChargedFeatureView<'_, X, Y>
impl<X, Y> CoordinateLike<X> for ChargedFeatureView<'_, X, Y>
Source§fn coordinate(&self) -> f64
fn coordinate(&self) -> f64
The trait method for accessing the coordinate of the object on coordinate
system
TSource§impl<'a, X, Y> FeatureLike<X, Y> for ChargedFeatureView<'a, X, Y>where
ChargedFeatureView<'a, X, Y>: TimeInterval<Y>,
impl<'a, X, Y> FeatureLike<X, Y> for ChargedFeatureView<'a, X, Y>where
ChargedFeatureView<'a, X, Y>: TimeInterval<Y>,
Source§fn iter(&self) -> impl Iterator<Item = (f64, f64, f32)>
fn iter(&self) -> impl Iterator<Item = (f64, f64, f32)>
Create an iterator that yields (x, y, intensity) references
Source§fn at(&self, index: usize) -> Option<(f64, f64, f32)>
fn at(&self, index: usize) -> Option<(f64, f64, f32)>
Get an immutable reference to feature data at a specified index
Source§fn at_time(&self, time: f64) -> Option<(f64, f64, f32)>
fn at_time(&self, time: f64) -> Option<(f64, f64, f32)>
Get an immutable reference to feature data at a specified time.Analogous
to combining
TimeInterval::find_time with FeatureLike::atSource§impl<X, Y> IntensityMeasurement for ChargedFeatureView<'_, X, Y>
impl<X, Y> IntensityMeasurement for ChargedFeatureView<'_, X, Y>
Source§impl<'a, X, Y> IntoIterator for ChargedFeatureView<'a, X, Y>
impl<'a, X, Y> IntoIterator for ChargedFeatureView<'a, X, Y>
Source§impl<X, Y> KnownCharge for ChargedFeatureView<'_, X, Y>
impl<X, Y> KnownCharge for ChargedFeatureView<'_, X, Y>
Source§impl<X, Y> PartialEq for ChargedFeatureView<'_, X, Y>
impl<X, Y> PartialEq for ChargedFeatureView<'_, X, Y>
Source§impl<X, Y> PartialOrd for ChargedFeatureView<'_, X, Y>
impl<X, Y> PartialOrd for ChargedFeatureView<'_, X, Y>
Source§impl<'a, X, Y> SplittableFeatureLike<'a, X, Y> for ChargedFeatureView<'a, X, Y>
impl<'a, X, Y> SplittableFeatureLike<'a, X, Y> for ChargedFeatureView<'a, X, Y>
Source§type ViewType = ChargedFeatureView<'a, X, Y>
type ViewType = ChargedFeatureView<'a, X, Y>
The type that will hold the split feature parts. They could be borrowed
or own a copy of their original data.
Source§fn split_at_time(&'a self, point: f64) -> (Self::ViewType, Self::ViewType)
fn split_at_time(&'a self, point: f64) -> (Self::ViewType, Self::ViewType)
Split the feature at
time. Read moreSource§fn slice<I: RangeBounds<usize> + Clone>(&'a self, bounds: I) -> Self::ViewType
fn slice<I: RangeBounds<usize> + Clone>(&'a self, bounds: I) -> Self::ViewType
Select the positions given by the range of positions in
boundsSource§fn split_at(&'a self, index: usize) -> (Self::ViewType, Self::ViewType)
fn split_at(&'a self, index: usize) -> (Self::ViewType, Self::ViewType)
Split the feature at
index, segmenting before and after it. The
position at index should be retained in the second segment.Source§fn split_mask(&'a self, mask: &[bool]) -> Vec<Self::ViewType>
fn split_mask(&'a self, mask: &[bool]) -> Vec<Self::ViewType>
Retain all positions where
mask is true, keeping contiguous positions
part of the same feature segments. Read moreSource§impl<X, Y> TimeArray<Y> for ChargedFeatureView<'_, X, Y>
impl<X, Y> TimeArray<Y> for ChargedFeatureView<'_, X, Y>
Source§impl<'a, X, Y> TimeInterval<Y> for ChargedFeatureView<'a, X, Y>
impl<'a, X, Y> TimeInterval<Y> for ChargedFeatureView<'a, X, 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 CoordinateRangeimpl<'a, X: Copy, Y: Copy> Copy for ChargedFeatureView<'a, X, Y>
Auto Trait Implementations§
impl<'a, X, Y> Freeze for ChargedFeatureView<'a, X, Y>
impl<'a, X, Y> RefUnwindSafe for ChargedFeatureView<'a, X, Y>where
X: RefUnwindSafe,
Y: RefUnwindSafe,
impl<'a, X, Y> Send for ChargedFeatureView<'a, X, Y>
impl<'a, X, Y> Sync for ChargedFeatureView<'a, X, Y>
impl<'a, X, Y> Unpin for ChargedFeatureView<'a, X, Y>
impl<'a, X, Y> UnwindSafe for ChargedFeatureView<'a, 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