Skip to main content

Hull

Trait Hull 

Source
pub trait Hull<T: ?Sized> {
    type Output;

    // Required method
    fn hull_with(&self, other: &T) -> Self::Output;
}
Expand description

Trait for computing the convex hull (bounding interval) of two values.

Required Associated Types§

Required Methods§

Source

fn hull_with(&self, other: &T) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Hull<i32> for i32

Source§

fn hull_with(&self, other: &i32) -> Self::Output

Computes the hull of two scalars: $\text{hull}(a,b) = [\min(a,b),; \max(a,b)]$

Source§

type Output = Interval<i32>

Implementors§

Source§

impl<T1, T2> Hull<Point<T1, T2>> for Point<T1, T2>
where T1: Hull<T1>, T2: Hull<T2>,

Source§

type Output = Point<<T1 as Hull<T1>>::Output, <T2 as Hull<T2>>::Output>

Source§

impl<T> Hull<Interval<T>> for Interval<T>
where T: Copy + Ord,

Source§

impl<T> Hull<Interval<T>> for T
where T: Copy + Ord,

Source§

impl<T> Hull<T> for Interval<T>
where T: Copy + Ord,