HDK
|
#include <denseHashMap.h>
Public Types | |
typedef std::pair< const Key, Data > | value_type |
typedef Key | key_type |
typedef Data | mapped_type |
typedef _IteratorBase < value_type, typename _Vector::iterator > | iterator |
typedef _IteratorBase< const value_type, typename _Vector::const_iterator > | const_iterator |
typedef std::pair< iterator, bool > | insert_result |
Return type for insert() method. More... | |
This is a space efficient container that mimics the TfHashMap API that uses a vector for storage when the size of the map is small.
When the map gets bigger than Threshold
a TfHashMap is allocated that is used to accelerate lookup in the vector.
Definition at line 59 of file denseHashMap.h.
typedef _IteratorBase<const value_type, typename _Vector::const_iterator> TfDenseHashMap< Key, Data, HashFn, EqualKey, Threshold >::const_iterator |
An iterator type for this map. Note that it provides access to the This::value_type only.
Definition at line 216 of file denseHashMap.h.
typedef std::pair<iterator, bool> TfDenseHashMap< Key, Data, HashFn, EqualKey, Threshold >::insert_result |
Return type for insert() method.
Definition at line 219 of file denseHashMap.h.
typedef _IteratorBase<value_type, typename _Vector::iterator> TfDenseHashMap< Key, Data, HashFn, EqualKey, Threshold >::iterator |
An iterator type for this map. Note that it provides access to the This::value_type only.
Definition at line 210 of file denseHashMap.h.
typedef Key TfDenseHashMap< Key, Data, HashFn, EqualKey, Threshold >::key_type |
Definition at line 69 of file denseHashMap.h.
typedef Data TfDenseHashMap< Key, Data, HashFn, EqualKey, Threshold >::mapped_type |
Definition at line 70 of file denseHashMap.h.
typedef std::pair<const Key, Data> TfDenseHashMap< Key, Data, HashFn, EqualKey, Threshold >::value_type |
Definition at line 68 of file denseHashMap.h.
|
inlineexplicit |
Ctor.
Definition at line 225 of file denseHashMap.h.
|
inline |
Construct with range.
Definition at line 234 of file denseHashMap.h.
|
inline |
Construct from an initializer_list.
Definition at line 240 of file denseHashMap.h.
|
inline |
Copy Ctor.
Definition at line 246 of file denseHashMap.h.
|
default |
Move Ctor.
|
inline |
Returns an const_iterator pointing to the beginning of the map.
Definition at line 334 of file denseHashMap.h.
|
inline |
Returns an const_iterator pointing to the beginning of the map.
Definition at line 346 of file denseHashMap.h.
|
inline |
Erases all of the elements
Definition at line 305 of file denseHashMap.h.
|
inline |
Returns the number of elements with key k
. Which is either 0 or 1.
Definition at line 386 of file denseHashMap.h.
|
inline |
true
if the map's
size is 0.
Definition at line 322 of file denseHashMap.h.
|
inline |
Returns an const_iterator pointing to the end of the map.
Definition at line 340 of file denseHashMap.h.
|
inline |
Returns an const_iterator pointing to the end of the map.
Definition at line 352 of file denseHashMap.h.
|
inline |
Erase element with key k
. Returns the number of elements erased.
Definition at line 459 of file denseHashMap.h.
|
inline |
Erases element pointed to by iter
.
Definition at line 471 of file denseHashMap.h.
|
inline |
Erases a range from the map.
Definition at line 497 of file denseHashMap.h.
|
inline |
Finds the element with key k
.
Definition at line 358 of file denseHashMap.h.
|
inline |
Finds the element with key k
.
Definition at line 372 of file denseHashMap.h.
|
inline |
Returns a pair of <iterator, bool> where iterator points to the element in the list and bool is true if a new element was inserted.
Definition at line 393 of file denseHashMap.h.
|
inline |
Insert a range into the hash map. Note that i0
and i1
can't point into the hash map.
Definition at line 420 of file denseHashMap.h.
|
inline |
Insert a range of unique elements into the container. [begin, end) must not contain any duplicate elements.
Definition at line 437 of file denseHashMap.h.
|
inline |
Definition at line 299 of file denseHashMap.h.
|
inline |
Copy assignment operator.
Definition at line 258 of file denseHashMap.h.
|
default |
Move assignment operator.
|
inline |
Assignment from an initializer_list.
Definition at line 272 of file denseHashMap.h.
|
inline |
Equality operator.
Definition at line 280 of file denseHashMap.h.
|
inline |
Indexing operator. Inserts a default constructed DataType() for key
if there is no value for key
already.
Returns a reference to the value type for key
.
Definition at line 453 of file denseHashMap.h.
|
inline |
Reserve space.
Definition at line 541 of file denseHashMap.h.
|
inline |
Optimize storage space.
Definition at line 515 of file denseHashMap.h.
|
inline |
Returns the size of the map.
Definition at line 328 of file denseHashMap.h.
|
inline |
Swaps the contents of two maps.
Definition at line 312 of file denseHashMap.h.