Trait sets::MutSetOps

source ·
pub trait MutSetOps<T> {
Show 13 methods // Required methods fn munordered(&mut self); fn mordered(&mut self, quantify: impl Copy + Fn(&T) -> f64, asc: bool); fn mindexed(&mut self, quantify: impl Copy + Fn(&T) -> f64, asc: bool); fn mranked(&mut self, asc: bool); fn msame(&mut self, s: &mut Self, quantify: impl Copy + Fn(&T) -> f64); fn mdelete(&mut self, item: T) -> bool; fn mdeleteall(&mut self, item: T) -> usize; fn minsert(&mut self, item: T); fn mreverse(&mut self); fn mnonrepeat(&mut self); fn munion(&mut self, s: &Self); fn mintersection(&mut self, s: &Self); fn mdifference(&mut self, s: &Self);
}
Expand description

Mutable methods for &mut Set

Required Methods§

source

fn munordered(&mut self)

Makes a Set unordered

source

fn mordered(&mut self, quantify: impl Copy + Fn(&T) -> f64, asc: bool)

Makes a Set ordered

source

fn mindexed(&mut self, quantify: impl Copy + Fn(&T) -> f64, asc: bool)

Makes any Set indexed

source

fn mranked(&mut self, asc: bool)

Converts any Set type to ranked

source

fn msame(&mut self, s: &mut Self, quantify: impl Copy + Fn(&T) -> f64)

General converter: s -> Set of the same type and order as self

source

fn mdelete(&mut self, item: T) -> bool

Deletes the first item from self

source

fn mdeleteall(&mut self, item: T) -> usize

Deletes all occurrences of a matching item from self, returns their count

source

fn minsert(&mut self, item: T)

Inserts an item of the same end-type to self

source

fn mreverse(&mut self)

reverses the vector of explicit sets and index of indexed sets

source

fn mnonrepeat(&mut self)

Deletes all repetitions

source

fn munion(&mut self, s: &Self)

Union of two sets of the same type

source

fn mintersection(&mut self, s: &Self)

Intersection of two sets of the same type

source

fn mdifference(&mut self, s: &Self)

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

Implementors§

source§

impl<T> MutSetOps<T> for Set<T>where T: Copy + PartialOrd + Default,