Trait sets::SetOps[][src]

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

Common methods for all four of the set structs.

Required methods

reverses the vector of explicit sets and index of indexed sets

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