VS2010 hash_map
来源:互联网 发布:彩票电视走势图软件 编辑:程序博客网 时间:2024/05/16 09:45
MSDN解释:
The template class describes an object that can be used by any of the hash associative containers — hash_map, hash_multimap, hash_set, or hash_multiset — as a default Traits parameter object to order and hash the elements they contain.
Remarks
Each hash associative container stores a hash traits object of type Traits (a template parameter). You can derive a class from a specialization of hash_compare to selectively override certain functions and objects, or you can supply your own version of this class if you meet certain minimum requirements. Specifically, for an object hash_comp of type hash_compare<Key, Traits>, the following behavior is required by the above containers:
For all values _Key of type Key, the call hash_comp(_Key) serves as a hash function, which yields a distribution of values of type size_t. The function supplied by hash_compare returns _Key.
For any value _Key1 of type Key that precedes _Key2 in the sequence and has the same hash value (value returned by the hash function), hash_comp(_Key2, _Key1) is false. The function must impose a total ordering on values of type Key. The function supplied by hash_compare returns comp(_Key2, _Key1), where comp is a stored object of type Traits that you can specify when you construct the object hash_comp. For the default Traits parameter type less<Key>, sort keys never decrease in value.
The integer constant bucket_size specifies the mean number of elements per "bucket" (hash-table entry) that the container should try not to exceed. It must be greater than zero. The value supplied by hash_compare is 4.
The integer constant min_buckets specifies the minimum number of buckets to maintain in the hash table. It must be a power of two and greater than zero. The value supplied by hash_compare is 8.
In Visual C++ .NET 2003, members of the <hash_map> and <hash_set> header files are no longer in the std namespace, but rather have been moved into the stdext namespace. See The stdext Namespace for more information.
- VS2010 hash_map
- vs2010中的hash_map debug版效率问题
- hash_map
- hash_map
- hash_map
- hash_map
- hash_map
- hash_map
- hash_map
- HASH_MAP
- hash_map
- hash_map
- hash_map
- hash_map
- hash_map
- hash_map
- hash_map
- hash_map
- java中equals和==的区别
- 如何在当前Eclipse的Console View中输出信息
- 如何使用Eclipse中对Web Browser的支持
- AIX 分页技术 - minperm、maxperm 和 lru_file_repage
- 2010中国青岛国际礼品工艺品家居品博览会
- VS2010 hash_map
- TextEditor相关操作
- 《向高房价宣战》
- linux 下代理服务器的设置 squid
- 如何建立自己的外贸网店?
- [转]一位高级程序员给学弟学妹的建议
- 利用花生客和路由器架设自己的FTP
- Java中throw和throws的区别
- 自己写个QQ微博申请工具