A manually managed hashset that uses linear probing to solve the collisions.
Constructs using either a list of keys, arrays of keys, or both.
A destructor is present on this object, but not explicitly documented in the source.
A postblit is present on this object, but not explicitly documented in the source.
Returns an input range that consists of each non-null key.
Clears and empties the set.
Returns the keys count.
Tries to insert key(s) in the set.
Minimizes the memory usage.
Tests the presence of a key in the set.
Support for appending element(s). Forwards insert().
Tries to remove a key from the set.
Reserves slots for at least N supplemental keys.
Provides an access to the keys.
Returns the slots count.
1 HashSet_LP!string commands; 2 // can insert up to 16 elements without reallocation 3 commands.reserve(15); 4 assert(commands.slotCount == 16); 5 // appends elements 6 commands.insert("move"); 7 commands.insert("insert"); 8 commands.insert("delete"); 9 // test for inclusion 10 assert("move" in commands); 11 // remove something 12 commands.remove("insert"); 13 assert(commands.count == 2); 14 assert("insert" !in commands); 15 // empties and frees memory 16 commands.clear; 17 // manually managed implies to destruct by hand 18 import iz.memory; 19 destruct(commands);