特に将棋と関係ない基礎的なコード More...
Namespaces | |
detail | |
log | |
Typedefs | |
typedef GeneralMask< unsigned long long > | Mask64 |
typedef GeneralMask< unsigned int > | Mask32 |
typedef GeneralMask< mask_int_t > | mask_t |
Functions | |
std::string | base64Encode (boost::dynamic_bitset<> src) |
boost::dynamic_bitset | base64Decode (std::string src) |
template<class T > | |
const CArrayIterator< T > | operator+ (const CArrayIterator< T > &iter, int diff) |
template<class T > | |
const CArrayIterator< T > | operator- (const CArrayIterator< T > &iter, int diff) |
template<class T , class T2 > | |
int | operator- (CArrayIterator< T > l, CArrayIterator< T2 > r) |
template<class T , class T2 > | |
bool | operator== (CArrayIterator< T > l, CArrayIterator< T2 > r) |
template<class T , class T2 > | |
bool | operator!= (CArrayIterator< T > l, CArrayIterator< T2 > r) |
template<class T , class T2 > | |
bool | operator< (CArrayIterator< T > l, CArrayIterator< T2 > r) |
template<class T , class T2 > | |
bool | operator> (CArrayIterator< T > l, CArrayIterator< T2 > r) |
template<typename T , typename T2 , size_t C> | |
bool | operator== (const CArray2dProxy< T, C > &l, const CArray2dProxy< T2, C > &r) |
template<typename T1 , typename T2 > | |
void | construct (T1 *ptr, const T2 &value, typename boost::enable_if< detail::BitCopyTraits< T1 > >::type *=0) |
template<typename T1 , typename T2 > | |
void | construct (T1 *ptr, const T2 &value, typename boost::disable_if< detail::BitCopyTraits< T1 > >::type *=0) |
template<typename T > | |
void | destroy (T *ptr) |
template<typename ForwardIterator > | |
void | destroy (ForwardIterator first, ForwardIterator last) |
std::string | eucToLang (const std::string &src) |
std::string | file_string (const boost::filesystem::path &path) |
template<typename T , size_t C> | |
bool | operator== (const FixedCapacityVector< T, C > &l, const FixedCapacityVector< T, C > &r) |
template<typename T , size_t C> | |
bool | operator< (const FixedCapacityVector< T, C > &l, const FixedCapacityVector< T, C > &r) |
template<class Integer > | |
bool | operator== (const GeneralMask< Integer > &l, const GeneralMask< Integer > &r) |
template<class Integer > | |
bool | operator!= (const GeneralMask< Integer > &l, const GeneralMask< Integer > &r) |
template<class Integer > | |
bool | operator< (const GeneralMask< Integer > &l, const GeneralMask< Integer > &r) |
template<class Integer > | |
const GeneralMask< Integer > | operator& (GeneralMask< Integer > l, GeneralMask< Integer > r) |
template<class Integer > | |
const GeneralMask< Integer > | operator| (GeneralMask< Integer > l, GeneralMask< Integer > r) |
template<class Integer > | |
const GeneralMask< Integer > | operator^ (GeneralMask< Integer > l, GeneralMask< Integer > r) |
template<class Integer > | |
const GeneralMask< Integer > | operator<< (GeneralMask< Integer > m, int shift) |
template<class Integer > | |
const GeneralMask< Integer > | operator>> (GeneralMask< Integer > m, int shift) |
std::ostream & | operator<< (std::ostream &, const mask_t &) |
template<unsigned int N, class T > | |
T | nthPower (T x) |
Reference: C++ Cookbook, Stephens, Diggins, Turkanis and Cogswell, O'Reilly,. More... | |
template<class T , int N, class Iter_T > | |
T | nthMoment (Iter_T first, Iter_T last, T mean) |
template<class T , class Iter_T > | |
T | computeVariance (Iter_T first, Iter_T last, T mean) |
template<class T , class Iter_T > | |
T | computeStdDev (Iter_T first, Iter_T last, T mean) |
template<class T , class Iter_T > | |
T | computeSkew (Iter_T first, Iter_T last, T mean) |
template<class T , class Iter_T > | |
T | computeKurtosisExcess (Iter_T first, Iter_T last, T mean) |
template<class T , class Iter_T > | |
void | computeStats (Iter_T first, Iter_T last, T &sum, T &mean, T &var, T &std_dev, T &skew, T &kurt) |
bool | operator== (MilliSeconds l, MilliSeconds r) |
bool | operator< (MilliSeconds l, MilliSeconds r) |
bool | operator== (MilliSeconds::Interval l, MilliSeconds::Interval r) |
bool | operator< (MilliSeconds::Interval l, MilliSeconds::Interval r) |
int | ncores () |
Returns number of logical processors (i.e. More... | |
unsigned int | random () |
unsigned int | time_seeded_random () |
std::string | sjis2euc (const std::string &str) |
Convert character encoding from Shift_JIS to EUC-JP. More... | |
void | sjis2euc (unsigned char &c1, unsigned char &c2) |
Reference: http://www.net.is.uec.ac.jp/~ueno/material/kanji/sjis2euc.html. More... | |
int | slowbsf (unsigned int mask) |
non-0 の時に呼ぶべし. More... | |
特に将棋と関係ない基礎的なコード
typedef GeneralMask<unsigned int> osl::misc::Mask32 |
typedef GeneralMask<unsigned long long> osl::misc::Mask64 |
typedef GeneralMask<mask_int_t> osl::misc::mask_t |
boost::dynamic_bitset osl::misc::base64Decode | ( | std::string | src) |
Definition at line 57 of file base64.cc.
References count.
Referenced by osl::record::CompactBoard::fromBase64(), and osl::record::fromBase64().
std::string osl::misc::base64Encode | ( | boost::dynamic_bitset<> | src) |
Definition at line 6 of file base64.cc.
Referenced by osl::record::CompactBoard::toBase64(), and osl::record::MiniBoard::toBase64().
T osl::misc::computeKurtosisExcess | ( | Iter_T | first, |
Iter_T | last, | ||
T | mean | ||
) |
Definition at line 68 of file math.h.
Referenced by computeStats().
T osl::misc::computeSkew | ( | Iter_T | first, |
Iter_T | last, | ||
T | mean | ||
) |
Definition at line 60 of file math.h.
Referenced by computeStats().
void osl::misc::computeStats | ( | Iter_T | first, |
Iter_T | last, | ||
T & | sum, | ||
T & | mean, | ||
T & | var, | ||
T & | std_dev, | ||
T & | skew, | ||
T & | kurt | ||
) |
Definition at line 76 of file math.h.
References computeKurtosisExcess(), computeSkew(), and computeVariance().
Referenced by showResult(), and showStatistics().
T osl::misc::computeStdDev | ( | Iter_T | first, |
Iter_T | last, | ||
T | mean | ||
) |
Definition at line 54 of file math.h.
References computeVariance().
T osl::misc::computeVariance | ( | Iter_T | first, |
Iter_T | last, | ||
T | mean | ||
) |
Definition at line 48 of file math.h.
Referenced by computeStats(), and computeStdDev().
|
inline |
Definition at line 40 of file construct.h.
Referenced by osl::misc::FixedCapacityVectorPushBack< T >::push_back(), and osl::misc::FixedCapacityVector< T, Capacity >::push_back().
|
inline |
Definition at line 49 of file construct.h.
|
inline |
Definition at line 57 of file construct.h.
Referenced by osl::misc::FixedCapacityVector< T, Capacity >::clear(), destroy(), osl::misc::FixedCapacityVector< T, Capacity >::erase(), osl::misc::FixedCapacityVector< T, Capacity >::operator=(), osl::misc::FixedCapacityVector< T, Capacity >::pop_back(), osl::misc::FixedCapacityVector< T, Capacity >::resize(), osl::misc::FixedCapacityVector< T, Capacity >::unique(), and osl::misc::FixedCapacityVector< T, Capacity >::~FixedCapacityVector().
|
inline |
Definition at line 63 of file construct.h.
References destroy().
std::string osl::misc::eucToLang | ( | const std::string & | src) |
Definition at line 14 of file eucToLang.cc.
Referenced by osl::record::kakinokiParseLine(), main(), osl::record::KanjiPrint::print(), osl::record::KanjiMove::selectCandidates(), osl::record::Record::setDate(), and osl::search::AlphaBeta2Tree< EvalT >::showPV().
std::string osl::misc::file_string | ( | const boost::filesystem::path & | path) |
Definition at line 6 of file filePath.cc.
Referenced by convert(), and osl::record::KisenFile::ipxFileName().
int osl::misc::ncores | ( | ) |
Returns number of logical processors (i.e.
cores). Linux and Mac are supported so far.
Definition at line 21 of file ncores.cc.
References count, and osl::eval::min().
Referenced by main().
T osl::misc::nthMoment | ( | Iter_T | first, |
Iter_T | last, | ||
T | mean | ||
) |
T osl::misc::nthPower | ( | T | x) |
|
inline |
Definition at line 90 of file carray.h.
References osl::misc::CArrayIterator< T >::ptr.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 80 of file carray.h.
References osl::misc::CArrayIterator< T >::ptr.
|
inline |
Definition at line 59 of file milliSeconds.h.
References osl::misc::MilliSeconds::value().
|
inline |
Definition at line 67 of file milliSeconds.h.
References osl::misc::MilliSeconds::Interval::value().
|
inline |
Definition at line 95 of file carray.h.
References osl::misc::CArrayIterator< T >::ptr.
|
inline |
Definition at line 115 of file mask.h.
References osl::misc::GeneralMask< Integer >::value().
|
inline |
Definition at line 207 of file fixedCapacityVector.h.
|
inline |
std::ostream& osl::misc::operator<< | ( | std::ostream & | , |
const mask_t & | |||
) |
|
inline |
Definition at line 32 of file carray2d.h.
References osl::misc::CArray2dProxy< T, Capacity2 >::a.
|
inline |
Definition at line 55 of file milliSeconds.h.
References osl::misc::MilliSeconds::value().
|
inline |
Definition at line 63 of file milliSeconds.h.
References osl::misc::MilliSeconds::Interval::value().
|
inline |
Definition at line 85 of file carray.h.
References osl::misc::CArrayIterator< T >::ptr.
|
inline |
Definition at line 105 of file mask.h.
References osl::misc::GeneralMask< Integer >::value().
|
inline |
Definition at line 202 of file fixedCapacityVector.h.
References osl::misc::FixedCapacityVector< T, Capacity >::begin(), osl::misc::FixedCapacityVector< T, Capacity >::end(), and osl::misc::FixedCapacityVector< T, Capacity >::size().
|
inline |
Definition at line 100 of file carray.h.
References osl::misc::CArrayIterator< T >::ptr.
|
inline |
|
inline |
|
inline |
unsigned int osl::misc::random | ( | ) |
Definition at line 4 of file random.cc.
Referenced by osl::misc::Random< unsigned int >::newValue(), osl::misc::Random< unsigned long long >::newValue(), osl::PathEncodingTable::PathEncodingTable(), osl::eval::endgame::KingPieceTable::randomize(), selectMove(), osl::eval::ml::Weights::setRandom(), and osl::eval::ml::MultiWeights::setRandom().
std::string osl::misc::sjis2euc | ( | const std::string & | str) |
Convert character encoding from Shift_JIS to EUC-JP.
This converter is simple enough to be applied to Shogi records. It may not completely implement the conversion algorithm.
Definition at line 9 of file sjis2euc.cc.
References result.
Referenced by osl::record::KisenIpxFile::getPlayer(), osl::record::KisenIpxFile::getTitle(), osl::record::kakinoki::KakinokiFile::isKakinokiFile(), osl::record::ki2::InputStream::load(), and osl::record::kakinoki::InputStream::load().
void osl::misc::sjis2euc | ( | unsigned char & | c1, |
unsigned char & | c2 | ||
) |
Reference: http://www.net.is.uec.ac.jp/~ueno/material/kanji/sjis2euc.html.
Definition at line 43 of file sjis2euc.cc.
|
inline |
unsigned int osl::misc::time_seeded_random | ( | ) |
Definition at line 10 of file random.cc.
Referenced by osl::game_playing::RandomPlayer::selectBestMove(), osl::game_playing::WinCountTracer::selectMove(), and osl::game_playing::WeightTracer::selectMoveAtRandom().