クラス テンプレート osl::container::GeneralSimpleHashTable< Record >

基本的な hash table とりあえず g++ (SGI STL) の hash_map を使って実装 [詳細]

#include <generalSimpleHashTable.h>

osl::container::GeneralSimpleHashTable< Record >に対する継承グラフ
Inheritance graph
[凡例]

すべてのメンバ一覧

構成

struct  Table

Public 型

typedef hash::HashKey HashKey

Public メソッド

 GeneralSimpleHashTable (size_t capacity=100000)
 ~GeneralSimpleHashTable ()
void clear ()
Record * allocate (const HashKey &key)
 表を探し,登録されてなければ新規エントリを登録する
Record * find (const HashKey &key)
 表を探す.新たに登録する事はない
const Record * find (const HashKey &key) const
size_t size () const
size_t capacity () const
int numCacheHit () const
int numRecordAfterFull () const
bool isVerbose () const
int divSize () const
 lock contention を下げるために分割した大きさ

Protected 変数

boost::scoped_ptr< Tabletable

説明

template<typename Record>
class osl::container::GeneralSimpleHashTable< Record >

基本的な hash table とりあえず g++ (SGI STL) の hash_map を使って実装

機能:

ある程度基本的な機能を実装したら,自分で実装しなおすほうがbetter。 この hash_map では GCを実装することは困難と思われるため

find, allocate で ポインタを返すため,要素を追加しても,既存の要素の アドレスが変化しないデータ構造を用いる必要がある.

generalSimpleHashTable.h39 行で定義されています。


型定義

template<typename Record>
typedef hash::HashKey osl::container::GeneralSimpleHashTable< Record >::HashKey

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


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

template<typename Record >
osl::container::GeneralSimpleHashTable< Record >::GeneralSimpleHashTable ( size_t  capacity = 100000  )  [inline, explicit]
引数:
capacity 表に保持する最大局面

generalSimpleHashTable.tcc160 行で定義されています。

template<typename Record >
osl::container::GeneralSimpleHashTable< Record >::~GeneralSimpleHashTable (  )  [inline]

generalSimpleHashTable.tcc167 行で定義されています。


関数

template<typename Record >
Record * osl::container::GeneralSimpleHashTable< Record >::allocate ( const HashKey key  )  [inline]

表を探し,登録されてなければ新規エントリを登録する

戻り値:
テーブルがいっぱい。 そうでなければ内部で確保した場所へのポインタ (間違っても delete しないこと)
例外:
TableFull 

generalSimpleHashTable.tcc180 行で定義されています。

参照先 osl::container::GeneralSimpleHashTable< Record >::table.

template<typename Record >
size_t osl::container::GeneralSimpleHashTable< Record >::capacity (  )  const [inline]
template<typename Record >
void osl::container::GeneralSimpleHashTable< Record >::clear (  )  [inline]
template<typename Record >
int osl::container::GeneralSimpleHashTable< Record >::divSize (  )  const [inline]

lock contention を下げるために分割した大きさ

osl::search::SimpleHashTableで再定義されています。

generalSimpleHashTable.tcc231 行で定義されています。

参照先 osl::container::GeneralSimpleHashTable< Record >::Table::DIVSIZE.

template<typename Record >
const Record * osl::container::GeneralSimpleHashTable< Record >::find ( const HashKey key  )  const [inline]
template<typename Record >
Record * osl::container::GeneralSimpleHashTable< Record >::find ( const HashKey key  )  [inline]

表を探す.新たに登録する事はない

戻り値:
存在しなければ0 そうでなければ内部で確保した場所へのポインタ (間違っても delete しないこと)

generalSimpleHashTable.tcc188 行で定義されています。

参照先 osl::container::GeneralSimpleHashTable< Record >::table.

参照元 osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), osl::search::AlphaBeta2< EvalT >::computeBestMoveIteratively(), osl::container::GeneralSimpleHashTable< Record >::Table::findInLock(), qsearch(), と osl::search::AlphaBeta2Tree< EvalT >::showPV().

template<typename Record>
bool osl::container::GeneralSimpleHashTable< Record >::isVerbose (  )  const

osl::search::SimpleHashTableで再定義されています。

template<typename Record >
int osl::container::GeneralSimpleHashTable< Record >::numCacheHit (  )  const [inline]
template<typename Record >
int osl::container::GeneralSimpleHashTable< Record >::numRecordAfterFull (  )  const [inline]
template<typename Record >
size_t osl::container::GeneralSimpleHashTable< Record >::size (  )  const [inline]

変数

template<typename Record>
boost::scoped_ptr<Table> osl::container::GeneralSimpleHashTable< Record >::table [protected]

このクラスの説明は次のファイルから生成されました:
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義
Sun May 16 09:57:56 2010に生成されました。  doxygen 1.6.3