[−][src]Struct find_peaks::PeakFinder
Setup for the peak filtering.
Change the settings by using the methods for specifing the lower and upper bounds.
Implementations
impl<'a, T> PeakFinder<'a, T, usize> where
T: Clone + Sub<Output = T> + PartialOrd,
[src]
T: Clone + Sub<Output = T> + PartialOrd,
impl<'a, T, S> PeakFinder<'a, T, S> where
T: Clone + Sub<Output = T> + PartialOrd,
S: Clone + Sub<Output = S> + PartialOrd,
[S]: ToOwned,
[src]
T: Clone + Sub<Output = T> + PartialOrd,
S: Clone + Sub<Output = S> + PartialOrd,
[S]: ToOwned,
pub fn new_with_x(y_data: &'a [T], x_data: &'a [S]) -> Self
[src]
pub fn find_peaks(&self) -> Vec<Peak<T>>
[src]
Outputs a vector of Peak<_>
structures containing peaks that matched the criteria
specified in PeakFinder<_>
.
Output will not contain some properties (for example, height, prominence) unless you
specified at least on of the corresponding bounds in PeakFinder<_>
-- the calculation of
the property is skipped.
Peaks are sorted by their height.
Examples
use find_peaks::PeakFinder; let y = [1., 2., 3., 0., 5., 0.]; let ps = PeakFinder::new(&y) .with_min_height(0.) .with_min_prominence(1.) .find_peaks(); assert_eq!( ps.iter().map(|x| x.middle_position()).collect::<Vec<_>>(), vec![4, 2] );
pub fn with_min_height(&mut self, h: T) -> &mut Self
[src]
pub fn with_max_height(&mut self, h: T) -> &mut Self
[src]
pub fn with_min_prominence(&mut self, prominence: T) -> &mut Self
[src]
pub fn with_max_prominence(&mut self, prominence: T) -> &mut Self
[src]
pub fn with_min_difference(&mut self, difference: T) -> &mut Self
[src]
pub fn with_max_difference(&mut self, difference: T) -> &mut Self
[src]
pub fn with_min_plateau_size(&mut self, size: usize) -> &mut Self
[src]
pub fn with_max_plateau_size(&mut self, size: usize) -> &mut Self
[src]
pub fn with_min_distance(&mut self, distance: S) -> &mut Self
[src]
pub fn with_max_distance(&mut self, distance: S) -> &mut Self
[src]
Trait Implementations
impl<'a, T: Clone, S: Clone> Clone for PeakFinder<'a, T, S> where
[S]: ToOwned,
[src]
[S]: ToOwned,
fn clone(&self) -> PeakFinder<'a, T, S>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<'a, T, S> !RefUnwindSafe for PeakFinder<'a, T, S>
impl<'a, T, S> !Send for PeakFinder<'a, T, S>
impl<'a, T, S> !Sync for PeakFinder<'a, T, S>
impl<'a, T, S> !Unpin for PeakFinder<'a, T, S>
impl<'a, T, S> !UnwindSafe for PeakFinder<'a, T, S>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,