/usr/include/osl/eval/ppair/piecePairTable.h is in libosl-dev 0.8.0-1.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | /* piecePairTable.h
*/
#ifndef EVAL_PPAIR_PIECEPAIRTABLE_H
#define EVAL_PPAIR_PIECEPAIRTABLE_H
#include "osl/eval/ppair/piecePairIndex.h"
namespace osl
{
namespace eval
{
namespace ppair
{
/**
* 駒の関係毎の評価値を格納した表.
* [Square*(Player*Ptype==PtypeO)] ^2
*
* @param T signed な char, int などが想定されている
*/
template <class T>
class PiecePairTable : public PiecePairIndex
{
public:
typedef T value_type;
protected:
/**
* const object に対して,データの変更は不可,読み込みは許可するために
* mutable にする.
*/
mutable CArray<value_type, maxPairIndex> values;
PiecePairTable() { values.fill(); }
~PiecePairTable() {}
public:
int value(unsigned int i) const
{
return values[i];
}
value_type& valueOf(unsigned int i1, unsigned int i2)
{
const unsigned int index = indexOf(i1,i2);
return values[index];
}
value_type& valueOf(Piece p1, Piece p2)
{
const unsigned int index = indexOf(p1,p2);
return values[index];
}
int valueOf(unsigned int i1, unsigned int i2) const
{
const unsigned int index = indexOf(i1,i2);
return values[index];
}
int valueOf(Piece p1, Piece p2) const
{
const unsigned int index = indexOf(p1,p2);
return values[index];
}
};
} // namespace ppair
} // namespace eval
} // namespace osl
#endif /* EVAL_PPAIR_PIECEPAIRTABLE_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
|