当前位置: 首页>>代码示例>>C++>>正文


C++ boost::hash_value方法代码示例

本文整理汇总了C++中boost::hash_value方法的典型用法代码示例。如果您正苦于以下问题:C++ boost::hash_value方法的具体用法?C++ boost::hash_value怎么用?C++ boost::hash_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在boost的用法示例。


在下文中一共展示了boost::hash_value方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: operator

        std::size_t operator()(const SurfaceVertex& v) const {
            using boost::hash_value;
            using boost::hash_combine;

            // Start with a hash value of 0    .
            std::size_t seed = 0;

            // Modify 'seed' by XORing and bit-shifting in
            // one member of 'Key' after the other:
            hash_combine(seed,hash_value(v.position[0]));
            hash_combine(seed,hash_value(v.position[1]));
            hash_combine(seed,hash_value(v.position[2]));

            // Return the result.
            return seed;
        }
开发者ID:shaugier,项目名称:FAST-1,代码行数:16,代码来源:Mesh.cpp

示例2:

locator::locator(const std::string &filename, const map_location &loc,
		int center_x, int center_y, const std::string& modifications) :
	val_(filename, loc, center_x, center_y, modifications)
{
	hash_ = hash_value(val_);
	hash1_ = hash_value1(val_);
}
开发者ID:SkyPrayerStudio,项目名称:War-Of-Kingdom,代码行数:7,代码来源:image.cpp

示例3: operator

	std::size_t operator()(const Edge<Z>& edge) const
	{
		using boost::hash_value;
		using boost::hash_combine;
		static std::hash<Z> observationHasher;		
		std::size_t seed = 0;
		hash_combine(seed,hash_value(edge.actionIndex));
		hash_combine(seed,observationHasher(edge.observation));
		return seed;
	}
开发者ID:Ignacio-Perez,项目名称:lightpomcp,代码行数:10,代码来源:Pomcp.hpp

示例4: hash_value

size_t hash_value(const locator::value& val) 
{
	using boost::hash_value;
	using boost::hash_combine;

	size_t hash = hash_value(val.type_);
	if (val.type_ == locator::FILE || val.type_ == locator::SUB_FILE) {
		hash_combine(hash, val.filename_);
	}
	if (val.type_ == locator::SUB_FILE) {
		hash_combine(hash, val.loc_.x);
		hash_combine(hash, val.loc_.y);
		hash_combine(hash, val.center_x_);
		hash_combine(hash, val.center_y_);
		hash_combine(hash, val.modifications_);
	}

	return hash;
}
开发者ID:SkyPrayerStudio,项目名称:War-Of-Kingdom,代码行数:19,代码来源:image.cpp

示例5: hash_value

 inline size_t
 hash_value (SubID const& sID)
 {
   return hash_value (string (sID));
 }
开发者ID:Ichthyostega,项目名称:Lumiera,代码行数:5,代码来源:sub-id.hpp

示例6: operator

 std::size_t operator()(const T& value) const {
   using boost::hash_value;
   return hash_value(value);
 }
开发者ID:chongbingbao,项目名称:libgm,代码行数:4,代码来源:hash.hpp


注:本文中的boost::hash_value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。