refactor!(argus-core): update find_intersection method

Don't separate the intersection finding code into a different trait, as
it can be bundled with interpolation method.
This commit is contained in:
Anand Balakrishnan 2023-09-07 13:28:30 -07:00
parent 3a9623b99b
commit 475d32c533
No known key found for this signature in database
5 changed files with 42 additions and 28 deletions

View file

@ -1,5 +1,5 @@
use super::interpolation::Linear;
use super::{FindIntersectionMethod, InterpolationMethod, SignalAbs};
use super::{InterpolationMethod, SignalAbs};
use crate::signals::Signal;
impl<T> core::ops::Neg for Signal<T>
@ -98,7 +98,7 @@ impl<T> core::ops::Sub<&Signal<T>> for &Signal<T>
where
for<'a, 'b> &'a T: core::ops::Sub<&'b T, Output = T>,
T: Clone + PartialOrd,
Linear: InterpolationMethod<T> + FindIntersectionMethod<T>,
Linear: InterpolationMethod<T>,
{
type Output = Signal<T>;
@ -133,7 +133,7 @@ impl<T> core::ops::Sub<&Signal<T>> for Signal<T>
where
for<'a, 'b> &'a T: core::ops::Sub<&'b T, Output = T>,
T: Clone + PartialOrd,
Linear: InterpolationMethod<T> + FindIntersectionMethod<T>,
Linear: InterpolationMethod<T>,
{
type Output = Signal<T>;