class template specialization
<vector>
std::hash<vector<bool>>
template <class T> struct hash; // unspecialized
template <class Alloc> struct hash <vector<bool,Alloc>>; // vector<bool>
Hash for vector
Unary function object class that defines the hash specialization for vector<bool>.为散列的vector<bool>特例化的一元函数对象。
该函数根据整个vector返回一个hash值。一个hash值是根据其参数得到的唯一(独一无二)的值,一般相同的参数总会返回相同的值,该返回值应该有很小的可能和另一个不同参数返回的值相同(因为碰撞带来的改变)。
使用vector<bool>作为无序容器(unordered_set或者unordered_map)的健应该是被允许的。
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.youkuaiyun.com/qq844352155
2014-8-20
于GDUT
-