pub struct Interval<S: Scalar> {
pub lower: S,
pub upper: S,
}Expand description
Interval arithmetic for bounds propagation.
Represents an interval [lower, upper].
Fields§
§lower: SLower bound
upper: SUpper bound
Implementations§
Source§impl<S: Scalar> Interval<S>
impl<S: Scalar> Interval<S>
Sourcepub fn from_center(center: S, half_width: S) -> Self
pub fn from_center(center: S, half_width: S) -> Self
Create from center and half-width.
Sourcepub fn intersection(&self, other: &Self) -> Option<Self>
pub fn intersection(&self, other: &Self) -> Option<Self>
Intersection of two intervals (None if empty).
Trait Implementations§
Source§impl<S: PartialEq + Scalar> PartialEq for Interval<S>
impl<S: PartialEq + Scalar> PartialEq for Interval<S>
impl<S: Copy + Scalar> Copy for Interval<S>
impl<S: Scalar> StructuralPartialEq for Interval<S>
Auto Trait Implementations§
impl<S> Freeze for Interval<S>where
S: Freeze,
impl<S> RefUnwindSafe for Interval<S>where
S: RefUnwindSafe,
impl<S> Send for Interval<S>
impl<S> Sync for Interval<S>
impl<S> Unpin for Interval<S>where
S: Unpin,
impl<S> UnsafeUnpin for Interval<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Interval<S>where
S: 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