Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
lib
hash
boardKey128.cc
Go to the documentation of this file.
1
/* boardKey128.cc
2
*/
3
#include "
osl/hash/boardKey128.h
"
4
#include "
osl/misc/random.h
"
5
#include <boost/foreach.hpp>
6
void
osl::hash::HashKey128::setRandom
()
7
{
8
board64
=
misc::Random<unsigned long long>::newValue
() & ~static_cast<uint64_t>(1);
9
board32
=
misc::Random<unsigned int>::newValue
();
10
}
11
12
osl::hash::HashKey128::StandHash::StandHash
()
13
{
14
BOOST_FOREACH(uint64_t& value, HashMajorPawn)
15
value =
misc::Random<unsigned long long>::newValue
() & ~1ull;
16
BOOST_FOREACH(uint64_t& value, HashPiece)
17
value =
misc::Random<unsigned long long>::newValue
() & ~1ull;
18
}
19
20
// ;;; Local Variables:
21
// ;;; mode:c++
22
// ;;; c-basic-offset:2
23
// ;;; End:
Generated on Sun Jul 21 2013 13:37:23 by
1.8.4