Trait sets::SetOps[][src]

pub trait SetOps<T> where
    T: Copy
{ fn nonrepeat(&self) -> Self
    where
        T: PartialOrd + Copy
;
fn infsup(&self) -> (T, usize, T, usize)
    where
        T: PartialOrd + Copy
;
fn member(&self, m: T) -> bool
    where
        T: PartialOrd
;
fn search(&self, m: T) -> Option<usize>
    where
        T: PartialOrd
;
fn union(&self, s: &Self) -> OrderedSet<T>
    where
        T: PartialOrd
;
fn intersection(&self, s: &Self) -> OrderedSet<T>
    where
        T: PartialOrd
;
fn difference(&self, s: &Self) -> OrderedSet<T>
    where
        T: PartialOrd
; }
Expand description

Methods for the set structs.

Required methods

Deletes any repetitions

Finds minimum, minimum’s first index, maximum, maximum’s first index

True if m is a member of the set

Search of a set, returns Some(index) of the last item found, or None.

Union of two sets of the same type

Intersection of two sets of the same type

Removing s from self (i.e. self-s)

Implementors