std::hash<vector<bool>>
template <class T> struct hash; // unspecialized
template <class Alloc> struct hash <vector<bool,Alloc>>; // vector<bool>
Unary function object class that defines the hash specialization for vector<bool>.
为散列的vector<bool>特例化的一元函数对象。
The functional call returns a hash value based on the entire vector: A hash value is a value that depends solely on its argument, returning always the same value for the same argument (for a given program execution). The value returned
shall have a small likelihood of being the same as the one returned for a different argument (with chances of collision approaching1/numeric_limits<size_t>::max).
该函数根据整个vector返回一个hash值。一个hash值是根据其参数得到的唯一(独一无二)的值,一般相同的参数总会返回相同的值,该返回值应该有很小的可能和另一个不同参数返回的值相同(因为碰撞带来的改变)。
This allows the use of vector<bool> objects as keys for unordered containers (like unordered_set or unordered_map).
使用vector<bool>作为无序容器(unordered_set或者unordered_map)的健应该是被允许的。
See hash for additional information.
Member functions
- operator()
- Returns a hash value for its argument, as a value of type size_t.
size_t is an unsigned integral type.
-
根据参数返回一个hash值。
-
-
这一篇想不到合适的例子,就不写例子了。(其实是写不出来0.0)
-
-
//翻译的不好的地方请多多指导,可以在下面留言或者点击左上方邮件地址给我发邮件,指出我的错误以及不足,以便我修改,更好的分享给大家,谢谢。
转载请注明出处:http://blog.csdn.net/qq844352155
2014-8-20
于GDUT
-