YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
Hash Extensions

散列扩展接口。 更多...

命名空间

 ystdex::details
 

struct  ystdex::combined_hash<>
 使用 std::hash 和 ystdex::hash_combine_seq 实现的对特定类型的散列。 更多...
 
struct  ystdex::combined_hash< _type >
 
struct  ystdex::combined_hash< std::tuple< _types...> >
 
struct  ystdex::combined_hash< std::pair< _type1, _type2 > >
 

函数

template<typename _type >
void ystdex::hash_combine (size_t &seed, const _type &val)
 重复计算散列。 更多...
 
template<typename _type , typename... _tParams>
size_t ystdex::hash_combine_seq (size_t seed, const _type &x, const _tParams &...args)
 
template<typename _tIn >
size_t ystdex::hash_range (_tIn first, _tIn last)
 重复对范围计算散列。 更多...
 
template<typename _tIn >
size_t ystdex::hash_range (size_t &seed, _tIn first, _tIn last)
 

详细描述

散列扩展接口。

注解
当前使用 Boost 定义的接口和近似实现。
参见
http://www.boost.org/doc/libs/1_54_0/doc/html/hash/reference.html#boost.hash_combine
自从
build 421

函数说明

template<typename _type >
void ystdex::hash_combine ( size_t &  seed,
const _type &  val 
)
inline

重复计算散列。

注解
(1UL << 31) / ((1 + std::sqrt(5)) / 4) == 0x9E3779B9
警告
实现( Boost 文档作为 Effects )可能改变,不应作为接口依赖。

在文件 functional.hpp474 行定义.

参考自 ystdex::hash_combine_seq() , 以及 ystdex::hash_range().

这是这个函数的调用关系图:

template<typename _type , typename... _tParams>
size_t ystdex::hash_combine_seq ( size_t  seed,
const _type &  x,
const _tParams &...  args 
)
inline

在文件 functional.hpp493 行定义.

参考 ystdex::hash_combine_seq().

函数调用图:

template<typename _tIn >
size_t ystdex::hash_range ( _tIn  first,
_tIn  last 
)
inline

重复对范围计算散列。

注解
使用 ADL 。

在文件 functional.hpp506 行定义.

参考 ystdex::iterator_transformation::first() , 以及 ystdex::hash_combine().

函数调用图:

template<typename _tIn >
size_t ystdex::hash_range ( size_t &  seed,
_tIn  first,
_tIn  last 
)
inline

在文件 functional.hpp516 行定义.

参考 ystdex::iterator_transformation::first() , 以及 ystdex::hash_combine().

函数调用图: