Struct sets::IndexedSet[][src]

pub struct IndexedSet<T> {
    pub ascending: bool,
    pub v: Vec<T>,
    pub i: Vec<usize>,
}
Expand description

Struct holding a borrowed unordered set and its sort index. Thus it is an index ordered set (ascending or descending).

Fields

ascending: boolv: Vec<T>i: Vec<usize>

Implementations

Initiliser, indexsorts an unordered slice

Initiliser, indexsorts an unordered Set

From Oredered is not often needed, as the index will be trivial

Converts ranks to sort index

Trait Implementations

Display implemented for struct IndexedSet.

Formats the value using the given formatter. Read more

just reverse the index

Deletes repetitions.

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

True if m is a member of the set

Search a Set for m. Returns index of the first m.

Union of two indexed sets of the same type -

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)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.