hash set

hash set

hash set是外部STL中的類,用於向收集器中存儲或快速檢索數據。收集器中的這些數據唯一,且數值充當關鍵字。

定義,成員函式,

定義

template <
class Key,
class Traits=hash_compare<Key, less<Key> >,
class Allocator=allocator<Key>
>
class hash_set

成員函式

Returns an iterator that addresses the first element in the hash_set.
clear
Erases all the elements of a hash_set.
count
Returns the number of elements in a hash_set whose key matches a parameter-specified key.
Tests if a hash_set is empty.
end
Returns an iterator that addresses the location succeeding the last element in a hash_set.
equal_range
Returns a pair of iterators respectively to the first element in a hash_set with a key that is greater than a specified key and to the first element in the hash_set with a key that is equal to or greater than the key.
Removes an element or a range of elements in a hash_set from specified positions or removes elements that match a specified key.
Returns an iterator addressing the location of an element in a hash_set that has a key equivalent to a specified key.
get_allocator
Returns a copy of the allocator object used to construct the hash_set.
insert
Inserts an element or a range of elements into a hash_set.
key_comp
Retrieves a copy of the comparison object used to order keys in a hash_set.
lower_bound
Returns an iterator to the first element in a hash_set with a key that is equal to or greater than a specified key.
max_size
Returns the maximum length of the hash_set.
rbegin
Returns an iterator addressing the first element in a reversed hash_set.
Returns an iterator that addresses the location succeeding the last element in a reversed hash_set.
Returns the number of elements in the hash_set.
swap
Exchanges the elements of two hash_sets.
upper_bound
Returns an iterator to the first element in a hash_set that with a key that is equal to or greater than a specified key.
Retrieves a copy of the hash traits object used to hash and order element key values in a hash_set.

相關詞條

熱門詞條

聯絡我們