nulib.collections.set

Sets

This module implements @nogc BTree-backed sets, replacement for std::set.

Members

Aliases

multiset
alias multiset(Key) = SetImpl!(Key, (a, b) => a < b, true, true)

An associative container which contains sets of objects of type Key.

set
alias set(Key) = SetImpl!(Key, (a, b) => a < b, false, true)

An associative container which contains sets of objects of type Key.

weak_multiset
alias weak_multiset(Key) = SetImpl!(Key, (a, b) => a < b, true, true)

An associative container which contains sets of objects of type Key.

weak_set
alias weak_set(Key) = SetImpl!(Key, (a, b) => a < b, false, false)

An associative container which contains sets of objects of type Key.

Structs

SetImpl
struct SetImpl(K, alias less = (a, b) => a < b, bool allowDuplicates = false, bool ownsMemory = false)

Set, designed to replace std::set usage. O(log(n)) insertion, removal, and search time. Set is designed to operate even without initialization through makeSet.

Meta

Authors

Steven Schveighoffer, Andrei Alexandrescu, Guillaume Piolat, Luna Nielsen