Struct gut::interval::ClosedInterval[][src]

pub struct ClosedInterval<T> {
    pub a: T,
    pub b: T,
}

Interval from a to b that contains both endponts, where a < b on the floating point line.

Fields

a: T

The lower limit of the interval

b: T

The upper limit of the interval

Implementations

impl<T: PartialOrd + PartialEq + Copy> ClosedInterval<T>[src]

pub fn new(a: T, b: T) -> ClosedInterval<T>[src]

pub fn is_singleton(&self) -> bool[src]

Check if this interval contains just one point

pub fn endpoint(&self, which: EndPoint) -> T[src]

impl<T: Sub<Output = T> + Copy + PartialOrd> ClosedInterval<T>[src]

pub fn length(&self) -> T[src]

Trait Implementations

impl<T: Float> Absorb<ClosedInterval<T>> for ClosedInterval<T>[src]

type Output = Self

impl<T: Float> Absorb<T> for ClosedInterval<T>[src]

type Output = Self

impl<T: Float> Centroid<Option<T>> for ClosedInterval<T>[src]

impl<T: Clone> Clone for ClosedInterval<T>[src]

impl<T: PartialOrd> Contains<T> for ClosedInterval<T>[src]

impl<T: Copy> Copy for ClosedInterval<T>[src]

impl<T: Debug> Debug for ClosedInterval<T>[src]

impl<T: Float> Default for ClosedInterval<T>[src]

fn default() -> Self[src]

Create an empty interval. The choice of enpoints here is arbitrary as long as b < a.

impl<T: Float> Empty for ClosedInterval<T>[src]

impl<T: Eq> Eq for ClosedInterval<T>[src]

impl<T: Hash> Hash for ClosedInterval<T>[src]

impl<T: Float> Intersect<ClosedInterval<T>> for ClosedInterval<T>[src]

type Output = Self

impl<T: PartialEq> PartialEq<ClosedInterval<T>> for ClosedInterval<T>[src]

impl<T> StructuralEq for ClosedInterval<T>[src]

impl<T> StructuralPartialEq for ClosedInterval<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for ClosedInterval<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for ClosedInterval<T> where
    T: Send
[src]

impl<T> Sync for ClosedInterval<T> where
    T: Sync
[src]

impl<T> Unpin for ClosedInterval<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for ClosedInterval<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsSlice<T> for T[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash

impl<T> CloneBytes for T where
    T: 'static + Clone
[src]

impl<T> CopyElem for T where
    T: Any + Copy
[src]

impl<T> DebugBytes for T where
    T: 'static + Debug
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> DropBytes for T where
    T: 'static, 
[src]

impl<T> Elem for T where
    T: Any + DropBytes
[src]

impl<T> From<T> for T[src]

impl<'a, S, I> Get<'a, I> for S where
    I: GetIndex<'a, S>, 
[src]

type Output = <I as GetIndex<'a, S>>::Output

impl<T> HashBytes for T where
    T: 'static + Hash
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<S, I> Isolate<I> for S where
    I: IsolateIndex<S>, 
[src]

type Output = <I as IsolateIndex<S>>::Output

impl<T> PartialEqBytes for T where
    T: 'static + PartialEq<T>, 
[src]

impl<T> Pod for T where
    T: 'static + Copy + Send + Sync + Any
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, N> PushArrayToVec<N> for T where
    T: Clone,
    N: Array<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.