词条 | hash set |
释义 | 简介hash_set类是外部STL中的类,用于向收集器中存储或快速检索数据。收集器中的这些数据唯一,且数值充当关键字。 定义template < class Key, class Traits=hash_compare<Key, less<Key> >, class Allocator=allocator<Key> > class hash_set 成员函数begin 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. empty 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. erase Removes an element or a range of elements in a hash_set from specified positions or removes elements that match a specified key. find 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. rend Returns an iterator that addresses the location succeeding the last element in a reversed hash_set. size 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. value_comp Retrieves a copy of the hash traits object used to hash and order element key values in a hash_set. |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。