7 #include <boost/foreach.hpp>
15 typedef hash_map<hash::BoardKey, Entry>
table_t;
26 typedef hash_map<hash::BoardKey, Entry>
table_t;
60 assert(HashKey(parent) == key);
61 BOOST_FOREACH(
Move m, moves) {
64 const HashKey new_key = key.newHashWithMove(m);
77 BOOST_FOREACH(
Move m, moves) {
80 const HashKey new_key = key.newHashWithMove(m);
81 root_table->table.erase(new_key.boardKey());
91 BOOST_FOREACH(
Move m, moves) {
94 const HashKey new_key = key.newHashWithMove(m);
106 BOOST_FOREACH(
Move m, moves) {
109 const HashKey new_key = key.newHashWithMove(m);
110 table->table.erase(new_key.boardKey());
118 RootTable::table_t::const_iterator p = root_table->table.find(cur.boardKey());
119 if (p != root_table->table.end() && p->second.parent != parent) {
120 if (cur.turn() ==
BLACK)
122 if (cur.blackStand().isSuperiorOrEqualTo(p->second.black_stand))
127 if (p->second.black_stand.isSuperiorOrEqualTo(cur.blackStand()))
133 Table::table_t::const_iterator p = table->table.find(cur.boardKey());
134 if (p != table->table.end()) {
135 if (cur.turn() ==
BLACK)
137 if (cur.blackStand().isSuperiorOrEqualTo(p->second.black_stand))
142 if (p->second.black_stand.isSuperiorOrEqualTo(cur.blackStand()))