All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Namespaces | Classes | Typedefs | Functions
osl::misc Namespace Reference

特に将棋と関係ない基礎的なコード More...

Namespaces

namespace  detail
namespace  log

Classes

struct  Align16New
struct  IncrementLock
class  AtomicCounter
struct  BinaryWriter
class  BinaryReader
class  BinaryElementReader
struct  Bsf< unsigned int >
struct  Bsf< unsigned short >
struct  Bsf< unsigned long long >
struct  Bsr< unsigned int >
struct  Bsr< unsigned long long >
struct  BitOp
struct  CArrayIterator
 CArray の iterator. More...
class  CArray
 boost::array のまね。operator[] に assert をいれたかったので。 More...
struct  CArray2dProxy
class  CArray2d
 CArray の2次元版 More...
struct  CArray3d
class  FixedCapacityVectorPushBack
class  FixedCapacityVector
struct  IconvConvert
class  LightScopedLock
class  LightMutex
class  LightMutexChar
struct  Int2Type
struct  Type2Type
struct  Player2Type
struct  EmptyType
class  GeneralMask
struct  SumDiffNthPower
struct  NoMoreTime
class  MilliSeconds
class  NonBlockDelete
class  PerfMon
class  TSC
class  Counter
class  CounterPair
class  MeasureTimeLock
class  PointerQueue
struct  Random< unsigned int >
struct  Random< unsigned long long >
struct  Reorder
struct  StaticInitializeTracer

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 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 >
nthPower (T x)
 Reference: C++ Cookbook, Stephens, Diggins, Turkanis and Cogswell, O'Reilly,.
template<class T , int N, class Iter_T >
nthMoment (Iter_T first, Iter_T last, T mean)
template<class T , class Iter_T >
computeVariance (Iter_T first, Iter_T last, T mean)
template<class T , class Iter_T >
computeStdDev (Iter_T first, Iter_T last, T mean)
template<class T , class Iter_T >
computeSkew (Iter_T first, Iter_T last, T mean)
template<class T , class Iter_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.
unsigned int random ()
unsigned int time_seeded_random ()
std::string sjis2euc (const std::string &str)
 Convert character encoding from Shift_JIS to EUC-JP.
void sjis2euc (unsigned char &c1, unsigned char &c2)
 Reference: http://www.net.is.uec.ac.jp/~ueno/material/kanji/sjis2euc.html.
int slowbsf (unsigned int mask)
 non-0 の時に呼ぶべし.

Detailed Description

特に将棋と関係ない基礎的なコード


Typedef Documentation

typedef GeneralMask<unsigned int> osl::misc::Mask32

Definition at line 150 of file mask.h.

typedef GeneralMask<unsigned long long> osl::misc::Mask64

Definition at line 149 of file mask.h.

typedef GeneralMask<mask_int_t> osl::misc::mask_t

Definition at line 158 of file mask.h.


Function Documentation

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)
template<class T , class Iter_T >
T osl::misc::computeKurtosisExcess ( Iter_T  first,
Iter_T  last,
mean 
)

Definition at line 68 of file math.h.

Referenced by computeStats().

template<class T , class Iter_T >
T osl::misc::computeSkew ( Iter_T  first,
Iter_T  last,
mean 
)

Definition at line 60 of file math.h.

Referenced by computeStats().

template<class T , class Iter_T >
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().

template<class T , class Iter_T >
T osl::misc::computeStdDev ( Iter_T  first,
Iter_T  last,
mean 
)

Definition at line 54 of file math.h.

References computeVariance().

template<class T , class Iter_T >
T osl::misc::computeVariance ( Iter_T  first,
Iter_T  last,
mean 
)

Definition at line 48 of file math.h.

Referenced by computeStats(), and computeStdDev().

template<typename T1 , typename T2 >
void osl::misc::construct ( T1 *  ptr,
const T2 &  value,
typename boost::enable_if< detail::BitCopyTraits< T1 > >::type *  = 0 
) [inline]
template<typename T1 , typename T2 >
void osl::misc::construct ( T1 *  ptr,
const T2 &  value,
typename boost::disable_if< detail::BitCopyTraits< T1 > >::type *  = 0 
) [inline]

Definition at line 49 of file construct.h.

template<typename T >
void osl::misc::destroy ( T *  ptr) [inline]
template<typename ForwardIterator >
void osl::misc::destroy ( ForwardIterator  first,
ForwardIterator  last 
) [inline]

Definition at line 63 of file construct.h.

References destroy().

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().

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().

template<class T , int N, class Iter_T >
T osl::misc::nthMoment ( Iter_T  first,
Iter_T  last,
mean 
)

Definition at line 41 of file math.h.

template<unsigned int N, class T >
T osl::misc::nthPower ( x)

Reference: C++ Cookbook, Stephens, Diggins, Turkanis and Cogswell, O'Reilly,.

Definition at line 17 of file math.h.

template<class T , class T2 >
bool osl::misc::operator!= ( CArrayIterator< T >  l,
CArrayIterator< T2 >  r 
) [inline]

Definition at line 90 of file carray.h.

References osl::misc::CArrayIterator< T >::ptr.

template<class Integer >
bool osl::misc::operator!= ( const GeneralMask< Integer > &  l,
const GeneralMask< Integer > &  r 
) [inline]

Definition at line 110 of file mask.h.

template<class Integer >
const GeneralMask<Integer> osl::misc::operator& ( GeneralMask< Integer >  l,
GeneralMask< Integer >  r 
) [inline]

Definition at line 121 of file mask.h.

References result.

template<class T >
const CArrayIterator<T> osl::misc::operator+ ( const CArrayIterator< T > &  iter,
int  diff 
) [inline]

Definition at line 68 of file carray.h.

References result.

template<class T >
const CArrayIterator<T> osl::misc::operator- ( const CArrayIterator< T > &  iter,
int  diff 
) [inline]

Definition at line 75 of file carray.h.

template<class T , class T2 >
int osl::misc::operator- ( CArrayIterator< T >  l,
CArrayIterator< T2 >  r 
) [inline]

Definition at line 80 of file carray.h.

References osl::misc::CArrayIterator< T >::ptr.

bool osl::misc::operator< ( MilliSeconds  l,
MilliSeconds  r 
) [inline]

Definition at line 59 of file milliSeconds.h.

References osl::misc::MilliSeconds::value().

bool osl::misc::operator< ( MilliSeconds::Interval  l,
MilliSeconds::Interval  r 
) [inline]

Definition at line 67 of file milliSeconds.h.

References osl::misc::MilliSeconds::Interval::value().

template<class T , class T2 >
bool osl::misc::operator< ( CArrayIterator< T >  l,
CArrayIterator< T2 >  r 
) [inline]

Definition at line 95 of file carray.h.

References osl::misc::CArrayIterator< T >::ptr.

template<class Integer >
bool osl::misc::operator< ( const GeneralMask< Integer > &  l,
const GeneralMask< Integer > &  r 
) [inline]

Definition at line 115 of file mask.h.

References osl::misc::GeneralMask< Integer >::value().

template<typename T , size_t C>
bool osl::misc::operator< ( const FixedCapacityVector< T, C > &  l,
const FixedCapacityVector< T, C > &  r 
) [inline]

Definition at line 207 of file fixedCapacityVector.h.

template<class Integer >
const GeneralMask<Integer> osl::misc::operator<< ( GeneralMask< Integer >  m,
int  shift 
) [inline]

Definition at line 139 of file mask.h.

References result.

std::ostream& osl::misc::operator<< ( std::ostream &  ,
const mask_t &   
)
template<typename T , typename T2 , size_t C>
bool osl::misc::operator== ( const CArray2dProxy< T, C > &  l,
const CArray2dProxy< T2, C > &  r 
) [inline]

Definition at line 32 of file carray2d.h.

References osl::misc::CArray2dProxy< T, Capacity2 >::a.

bool osl::misc::operator== ( MilliSeconds  l,
MilliSeconds  r 
) [inline]

Definition at line 55 of file milliSeconds.h.

References osl::misc::MilliSeconds::value().

bool osl::misc::operator== ( MilliSeconds::Interval  l,
MilliSeconds::Interval  r 
) [inline]

Definition at line 63 of file milliSeconds.h.

References osl::misc::MilliSeconds::Interval::value().

template<class T , class T2 >
bool osl::misc::operator== ( CArrayIterator< T >  l,
CArrayIterator< T2 >  r 
) [inline]

Definition at line 85 of file carray.h.

References osl::misc::CArrayIterator< T >::ptr.

template<class Integer >
bool osl::misc::operator== ( const GeneralMask< Integer > &  l,
const GeneralMask< Integer > &  r 
) [inline]

Definition at line 105 of file mask.h.

References osl::misc::GeneralMask< Integer >::value().

template<typename T , size_t C>
bool osl::misc::operator== ( const FixedCapacityVector< T, C > &  l,
const FixedCapacityVector< T, C > &  r 
) [inline]
template<class T , class T2 >
bool osl::misc::operator> ( CArrayIterator< T >  l,
CArrayIterator< T2 >  r 
) [inline]

Definition at line 100 of file carray.h.

References osl::misc::CArrayIterator< T >::ptr.

template<class Integer >
const GeneralMask<Integer> osl::misc::operator>> ( GeneralMask< Integer >  m,
int  shift 
) [inline]

Definition at line 144 of file mask.h.

References result.

template<class Integer >
const GeneralMask<Integer> osl::misc::operator^ ( GeneralMask< Integer >  l,
GeneralMask< Integer >  r 
) [inline]

Definition at line 133 of file mask.h.

References result.

template<class Integer >
const GeneralMask<Integer> osl::misc::operator| ( GeneralMask< Integer >  l,
GeneralMask< Integer >  r 
) [inline]

Definition at line 127 of file mask.h.

References result.

unsigned int osl::misc::random ( )
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 
)
int osl::misc::slowbsf ( unsigned int  mask) [inline]

non-0 の時に呼ぶべし.

やはりどう考えても遅い

Definition at line 14 of file slowBsf.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines