Trait alga::general::Lattice [] [src]

pub trait Lattice: MeetSemilattice + JoinSemilattice + PartialOrd {
    fn meet_join(&self, other: &Self) -> (Self, Self) { ... }
    fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self> { ... }
    fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self> { ... }
    fn partial_sort2<'a>(&'a self, other: &'a Self) -> Option<(&'a Self, &'a Self)> { ... }
    fn partial_clamp<'a>(&'a self, min: &'a Self, max: &'a Self) -> Option<&'a Self> { ... }
}

Partially orderable sets where every two elements have a suppremum and infimum.

Provided Methods

Returns the infimum and the supremum simultaneously.

Return the minimum of self and other if they are comparable.

Return the maximum of self and other if they are comparable.

Sorts two values in increasing order using a partial ordering.

Clamp value between min and max. Returns None if value is not comparable to min or max.

Implementors