Set

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

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Postblit

A postblit is present on this object, but not explicitly documented in the source.

Members

Functions

clearContents
void clearContents()

Removes all elements from the set.

contains
bool contains(K key)
empty
bool empty()
insert
bool insert(K key)

Insert an element in the container. If allowDuplicates is false, this can fail and return false if the already contains an element with equivalent key.

length
size_t length()
opBinaryRight
bool opBinaryRight(K key)
opIndex
bool opIndex(K key)
opSlice
auto opSlice()

Fetch a range that spans all the elements in the container.

remove
bool remove(K key)

Removes an element from the container. Returns: true if the removal took place.

Meta