boardKey.tcc
Go to the documentation of this file.
00001 /* boardKey.tcc
00002  */
00003 #ifndef _BOARD_KEY_TCC
00004 #define _BOARD_KEY_TCC
00005 #include "osl/hash/boardKey.h"
00006 #include "osl/misc/random.h"
00007 
00008 template<typename T,size_t SIZE>
00009 osl::hash::GeneralBoardKey<T,SIZE>::
00010 GeneralBoardKey()
00011 {
00012   elements.fill(0);
00013 }
00014 
00015 template<typename T,size_t SIZE>
00016 void osl::hash::GeneralBoardKey<T,SIZE>::setRandom()
00017 {
00018   elements[0]=misc::Random<T>::newValue() & ~static_cast<T>(1);
00019   for(size_t i=1;i<SIZE;i++)
00020     elements[i]=misc::Random<T>::newValue();
00021 }
00022 
00023 template<typename SignatureBoardKeyBase>
00024 void osl::hash::GeneralHashKey<SignatureBoardKeyBase>::setRandom()
00025 {
00026   board_key.setRandom();
00027   // pieceStandには触らない
00028 }
00029 
00030 #endif /* _BOARD_KEY_TCC */
00031 // ;;; Local Variables:
00032 // ;;; mode:c++
00033 // ;;; c-basic-offset:2
00034 // ;;; End:
00035 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines