Template for a struct implementing a single bucket in a set (see
ocean.util.container.map.model.BucketSet). A bucket contains a set of
elements which can be added to, removed from and searched.
Each element in a bucket has a unique key with which it can be identified.
The elements' key type is templated, but defaults to hash_t. A bucket can
only contain one element with a given key - if a duplicate is added it will
replace the original. The elements in the bucket are stored as a linked
list, for easy removal and insertion.
Note that the bucket does not own its elements, these must be managed from
the outside in a pool. The bucket itself simply keeps a pointer to the first
element which it contains.
Two element structs exist in this module, one for a basic bucket element,
and one for a bucket element which contains a value in addition to a key.
Usage:
See ocean.util.container.map.model.BucketSet,
ocean.util.container.map.HashMap & ocean.util.container.map.HashSet
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).
Template for a struct implementing a single bucket in a set (see ocean.util.container.map.model.BucketSet). A bucket contains a set of elements which can be added to, removed from and searched.
Each element in a bucket has a unique key with which it can be identified. The elements' key type is templated, but defaults to hash_t. A bucket can only contain one element with a given key - if a duplicate is added it will replace the original. The elements in the bucket are stored as a linked list, for easy removal and insertion.
Note that the bucket does not own its elements, these must be managed from the outside in a pool. The bucket itself simply keeps a pointer to the first element which it contains.
Two element structs exist in this module, one for a basic bucket element, and one for a bucket element which contains a value in addition to a key.
Usage: See ocean.util.container.map.model.BucketSet, ocean.util.container.map.HashMap & ocean.util.container.map.HashSet