ocean.util.container.map.Set

Template for a class implementing a set of hashed keys. The set is built on top of an efficient bucket algorithm, allowing for fast look up of keys in the set.

Usage example:

import ocean.util.container.map.HashSet;

// A set of hash_t's
auto set = new HashSet;

hash_t hash = 232323;

// Add a hash
set.put(hash);

// Check if a hash exists in the set (null if not found)
auto exists = hash in set;

// Remove a hash from the set
set.remove(hash);

// Clear the set
set.clear();

Members

Classes

Set
class Set(K)

Set class. Manages a set of K's with fast lookup. The toHash() method must be implemented.

StandardHashingSet
class StandardHashingSet(K)

StandardKeyHashingSet class template. Manages a set of K's with fast lookup using a standard way of hash calculation:

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).