クラス テンプレート shttl::simple_hasher< T >

#include <simple_hasher.h>

shttl::simple_hasher< T >に対する継承グラフ

Inheritance graph
[凡例]
shttl::simple_hasher< T >のコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public 型

typedef hasher< T > base_type
typedef base_type::size_type size_type
typedef simple_hasher< T > this_type
typedef T value_type

Public メソッド

size_type index (const T &t) const
bool match (const T &lhs, const T &rhs) const
rebuild (const T &tag, size_type index) const
 simple_hasher (const size_type s)
size_type size () const
tag (const T &key) const

Static Public 変数

static std::numeric_limits<
value_type
value_info

Protected 変数

size_type m_idx_bit
size_type m_idx_mask

説明

template<class T = int>
class shttl::simple_hasher< T >

simple_hasher.h45 行で定義されています。


型定義

template<class T = int>
typedef hasher<T> shttl::simple_hasher< T >::base_type

simple_hasher.h51 行で定義されています。

template<class T = int>
typedef base_type::size_type shttl::simple_hasher< T >::size_type

shttl::hasher< T >を再定義しています。

simple_hasher.h53 行で定義されています。

template<class T = int>
typedef simple_hasher<T> shttl::simple_hasher< T >::this_type

simple_hasher.h50 行で定義されています。

template<class T = int>
typedef T shttl::simple_hasher< T >::value_type

simple_hasher.h54 行で定義されています。


コンストラクタとデストラクタ

template<class T = int>
shttl::simple_hasher< T >::simple_hasher ( const size_type  s  )  [inline, explicit]

simple_hasher.h62 行で定義されています。

参照先 shttl::simple_hasher< T >::value_info.

00062                                                   :
00063             m_idx_bit ( s ), 
00064             m_idx_mask( (size_type)mask(0, s) )
00065         {
00066             if( s <= 0 || (u64)value_info.max() < (u64)s ){
00067                 throw std::invalid_argument("simple_hasher::simple_hasher");
00068             }
00069         } 


関数

template<class T = int>
size_type shttl::simple_hasher< T >::index ( const T &  t  )  const [inline, virtual]

shttl::hasher< T >を実装しています。

simple_hasher.h72 行で定義されています。

参照先 shttl::simple_hasher< T >::m_idx_mask.

00073         {  
00074             return static_cast<size_type>(t) & m_idx_mask;
00075         }

template<class T = int>
bool shttl::simple_hasher< T >::match ( const T &  lhs,
const T &  rhs 
) const [inline, virtual]

shttl::hasher< T >を実装しています。

simple_hasher.h89 行で定義されています。

参照先 shttl::simple_hasher< T >::size().

00090         {
00091         #ifdef SHTTL_DEBUG
00092             if( size() < (size_type)lhs || size() < (size_type)rhs ){
00093                 throw std::range_error("simple_hasher::match");
00094             }
00095         #endif
00096             return lhs == rhs;
00097         }

関数の呼び出しグラフ:

template<class T = int>
T shttl::simple_hasher< T >::rebuild ( const T &  tag,
size_type  index 
) const [inline]

simple_hasher.h84 行で定義されています。

参照先 shttl::simple_hasher< T >::m_idx_bit.

00085         {
00086             return (T)((tag << m_idx_bit) | index);
00087         }

template<class T = int>
size_type shttl::simple_hasher< T >::size (  )  const [inline, virtual]

shttl::hasher< T >を実装しています。

simple_hasher.h59 行で定義されています。

参照先 shttl::simple_hasher< T >::m_idx_mask.

参照元 shttl::simple_hasher< T >::match().

00059 { return m_idx_mask + 1; }

Here is the caller graph for this function:

template<class T = int>
T shttl::simple_hasher< T >::tag ( const T &  key  )  const [inline, virtual]

shttl::hasher< T >を実装しています。

simple_hasher.h78 行で定義されています。

参照先 shttl::simple_hasher< T >::m_idx_bit.

00079         {
00080             return key >> m_idx_bit;
00081         }


変数

template<class T = int>
size_type shttl::simple_hasher< T >::m_idx_bit [protected]

simple_hasher.h101 行で定義されています。

参照元 shttl::simple_hasher< T >::rebuild()shttl::simple_hasher< T >::tag().

template<class T = int>
size_type shttl::simple_hasher< T >::m_idx_mask [protected]

simple_hasher.h102 行で定義されています。

参照元 shttl::simple_hasher< T >::index()shttl::simple_hasher< T >::size().

template<class T = int>
std::numeric_limits<value_type> shttl::simple_hasher< T >::value_info [static]

simple_hasher.h56 行で定義されています。

参照元 shttl::simple_hasher< T >::simple_hasher().


このクラスの説明は次のファイルから生成されました:
Onikiri2に対してTue Jun 18 15:36:11 2013に生成されました。  doxygen 1.4.7