pub struct EventFinder { /* private fields */ }Expand description
Uniform-scan event finder over a finite time window.
Implementations§
Source§impl EventFinder
impl EventFinder
Sourcepub fn new(
start_seconds: f64,
end_seconds: f64,
step_seconds: f64,
time_tolerance_seconds: f64,
) -> Result<Self, EventFinderError>
pub fn new( start_seconds: f64, end_seconds: f64, step_seconds: f64, time_tolerance_seconds: f64, ) -> Result<Self, EventFinderError>
Construct an event finder over [start_seconds, end_seconds].
Sourcepub fn start_seconds(self) -> f64
pub fn start_seconds(self) -> f64
Start of the search window.
Sourcepub fn end_seconds(self) -> f64
pub fn end_seconds(self) -> f64
End of the search window.
Sourcepub fn step_seconds(self) -> f64
pub fn step_seconds(self) -> f64
Uniform coarse-scan step.
Sourcepub fn time_tolerance_seconds(self) -> f64
pub fn time_tolerance_seconds(self) -> f64
Event-time refinement tolerance.
Sourcepub fn find_crossings<P>(
self,
predicate: P,
threshold: f64,
) -> Result<Vec<CrossingEvent>, EventFinderError>where
P: ScalarEventPredicate,
pub fn find_crossings<P>(
self,
predicate: P,
threshold: f64,
) -> Result<Vec<CrossingEvent>, EventFinderError>where
P: ScalarEventPredicate,
Find refined threshold crossings of a scalar predicate.
Sourcepub fn find_crossings_batch_serial<P>(
self,
predicates: &[P],
threshold: f64,
) -> Vec<Result<Vec<CrossingEvent>, EventFinderError>>where
P: ScalarEventPredicate,
pub fn find_crossings_batch_serial<P>(
self,
predicates: &[P],
threshold: f64,
) -> Vec<Result<Vec<CrossingEvent>, EventFinderError>>where
P: ScalarEventPredicate,
Find threshold crossings for a batch of scalar predicates, serially.
Result element i belongs to predicates[i].
Sourcepub fn find_crossings_batch_parallel<P>(
self,
predicates: &[P],
threshold: f64,
) -> Vec<Result<Vec<CrossingEvent>, EventFinderError>>where
P: ScalarEventPredicate + Sync,
pub fn find_crossings_batch_parallel<P>(
self,
predicates: &[P],
threshold: f64,
) -> Vec<Result<Vec<CrossingEvent>, EventFinderError>>where
P: ScalarEventPredicate + Sync,
Find threshold crossings for a batch of scalar predicates in parallel.
Each predicate is evaluated by the same kernel as
EventFinder::find_crossings. The indexed collect preserves input
order, so result element i belongs to predicates[i].
Sourcepub fn find_extrema<P>(
self,
predicate: P,
) -> Result<Vec<ExtremumEvent>, EventFinderError>where
P: ScalarEventPredicate,
pub fn find_extrema<P>(
self,
predicate: P,
) -> Result<Vec<ExtremumEvent>, EventFinderError>where
P: ScalarEventPredicate,
Find refined local maxima and minima of a scalar predicate.
Sourcepub fn find_extrema_batch_serial<P>(
self,
predicates: &[P],
) -> Vec<Result<Vec<ExtremumEvent>, EventFinderError>>where
P: ScalarEventPredicate,
pub fn find_extrema_batch_serial<P>(
self,
predicates: &[P],
) -> Vec<Result<Vec<ExtremumEvent>, EventFinderError>>where
P: ScalarEventPredicate,
Find local extrema for a batch of scalar predicates, serially.
Result element i belongs to predicates[i].
Sourcepub fn find_extrema_batch_parallel<P>(
self,
predicates: &[P],
) -> Vec<Result<Vec<ExtremumEvent>, EventFinderError>>where
P: ScalarEventPredicate + Sync,
pub fn find_extrema_batch_parallel<P>(
self,
predicates: &[P],
) -> Vec<Result<Vec<ExtremumEvent>, EventFinderError>>where
P: ScalarEventPredicate + Sync,
Find local extrema for a batch of scalar predicates in parallel.
Each predicate is evaluated by the same kernel as
EventFinder::find_extrema. The indexed collect preserves input order,
so result element i belongs to predicates[i].
Sourcepub fn find_state_changes<P>(
self,
predicate: P,
) -> Result<Vec<StateChangeEvent>, EventFinderError>where
P: DiscreteEventPredicate,
pub fn find_state_changes<P>(
self,
predicate: P,
) -> Result<Vec<StateChangeEvent>, EventFinderError>where
P: DiscreteEventPredicate,
Find refined changes of a boolean state predicate.
Sourcepub fn find_state_changes_batch_serial<P>(
self,
predicates: &[P],
) -> Vec<Result<Vec<StateChangeEvent>, EventFinderError>>where
P: DiscreteEventPredicate,
pub fn find_state_changes_batch_serial<P>(
self,
predicates: &[P],
) -> Vec<Result<Vec<StateChangeEvent>, EventFinderError>>where
P: DiscreteEventPredicate,
Find state changes for a batch of discrete predicates, serially.
Result element i belongs to predicates[i].
Sourcepub fn find_state_changes_batch_parallel<P>(
self,
predicates: &[P],
) -> Vec<Result<Vec<StateChangeEvent>, EventFinderError>>where
P: DiscreteEventPredicate + Sync,
pub fn find_state_changes_batch_parallel<P>(
self,
predicates: &[P],
) -> Vec<Result<Vec<StateChangeEvent>, EventFinderError>>where
P: DiscreteEventPredicate + Sync,
Find state changes for a batch of discrete predicates in parallel.
Each predicate is evaluated by the same kernel as
EventFinder::find_state_changes. The indexed collect preserves input
order, so result element i belongs to predicates[i].
Trait Implementations§
Source§impl Clone for EventFinder
impl Clone for EventFinder
Source§fn clone(&self) -> EventFinder
fn clone(&self) -> EventFinder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EventFinder
Source§impl Debug for EventFinder
impl Debug for EventFinder
Source§impl PartialEq for EventFinder
impl PartialEq for EventFinder
Source§fn eq(&self, other: &EventFinder) -> bool
fn eq(&self, other: &EventFinder) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EventFinder
Auto Trait Implementations§
impl Freeze for EventFinder
impl RefUnwindSafe for EventFinder
impl Send for EventFinder
impl Sync for EventFinder
impl Unpin for EventFinder
impl UnsafeUnpin for EventFinder
impl UnwindSafe for EventFinder
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
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.