#include <coherence/util/HashSet.hpp>
Inherits MappedSet.
Public Types | |
typedef spec::Handle | Handle |
HashSet Handle definition. | |
typedef spec::View | View |
HashSet View definition. | |
typedef spec::Holder | Holder |
HashSet Holder definition. | |
Static Public Member Functions | |
static float32_t | getDefaultLoadFactor () |
The default acceptable load factor before resizing occurs (1.0F). | |
static float32_t | getDefaultGrowthRate () |
The default rate of bucket growth when a resize occurs (3.0F). | |
Static Public Attributes | |
static const size32_t | default_initial_buckets |
The default value for initial number of hash buckets. | |
Protected Member Functions | |
HashSet (size32_t cInitialBuckets=default_initial_buckets, float32_t flLoadFactor=getDefaultLoadFactor(), float32_t flGrowthRate=getDefaultGrowthRate()) | |
Construct a hash set using the specified settings. | |
HashSet (Collection::View vCol) | |
Constructs a new set containing the elements in the specified Collection. | |
HashSet (const HashSet &that) | |
Copy constructor. |
HashSet | ( | size32_t | cInitialBuckets = default_initial_buckets , |
|
float32_t | flLoadFactor = getDefaultLoadFactor() , |
|||
float32_t | flGrowthRate = getDefaultGrowthRate() | |||
) | [protected] |
Construct a hash set using the specified settings.
cInitialBuckets | the initial number of hash buckets, 0 < n | |
flLoadFactor | the acceptable load factor before resizing occurs, 0 < n, such that a load factor of 1.0 causes resizing when the number of entries exceeds the number of buckets | |
flGrowthRate | the rate of bucket growth when a resize occurs, 0 < n, such that a growth rate of 1.0 will double the number of buckets: bucketcount = bucketcount * (1 + growthrate) |
HashSet | ( | Collection::View | vCol | ) | [protected] |
Constructs a new set containing the elements in the specified Collection.
The HashSet is created with default load factor (1.0) and an initial capacity sufficient to contain the elements in the specified collection.
vCol | the collection whose elements are to be placed into this set |