Struct sets::IndexedSet
source · [−]Expand description
Struct holding an unordered set and its sort index. Thus it is an index ordered set (ascending or descending).
Fields
ascending: bool
v: Vec<T>
i: Vec<usize>
Implementations
Initialiser, indexsorts an unordered slice
Initialiser, indexsorts an unordered Set
From Oredered, the sort index will be trivial
Converts ranks to sort index
Trait Implementations
Display implemented for struct IndexedSet.
These are generally better than OrderedSet(s) for bulky end types, as there is not so much of moving them around.
deletes repetitions.
Union of two IndexedSets reassigned to self.
self will be ascending ordered
Intersection of two IndexedSets
Complement of s in self (i.e. self-s)
These are generally better than OrderedSet(s) for bulky end types, as there is not so much of moving them around.
Finds minimum, minimum’s first index, maximum, maximum’s first index
True if m is a member of the set
Union of two IndexedSets. Returns an OrderedSet.
Intersection of two sets of the same type.
Via OrderedSet for convenience, for now.
Probably should use intersect_indexed as in union
above.
Complement of s in self (i.e. self-s)