OpenHashSet

Simple open-addressed hash set. Use this instead of HashSet when the size and quantity of the data to be inserted is small.

Constructors

this
this(size_t initialCapacity)

Initializes the hash set with the given initial capacity.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)

Disallow copy construction

Members

Aliases

opSlice
alias opSlice = range

Functions

clear
void clear()

Removes all items from the hash set.

contains
bool contains(T item)
empty
bool empty()
insert
bool insert(T item)

Inserts the gien item into the set.

length
size_t length()
opBinaryRight
bool opBinaryRight(T item)
opOpAssign
bool opOpAssign(T item)

Inserts the gien item into the set.

range
auto range()
remove
bool remove(T item)

Parameters

T

the element type of the hash set

hashFunction

the hash function to use

supportGC

if true, calls to GC.addRange and GC.removeRange will be used to ensure that the GC does not accidentally free memory owned by this container.

Meta