osl::rating::PatternGroup Struct Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
osl::rating::PatternGroup Struct Reference

`#include <patternGroup.h>`

Inheritance diagram for osl::rating::PatternGroup:
[legend]
Collaboration diagram for osl::rating::PatternGroup:
[legend]

## Public Member Functions
| PatternGroup (Direction d, Direction d2=Pattern::INVALID)
void | show (std::ostream &os, int name_width, const range_t &range, const vector< double > &weights) const
int | findMatch (const NumEffectState &state, Move m, const RatingEnv &) const
bool | effectiveInCheck () const
Public Member Functions inherited from osl::rating::Group
| Group (const std::string &name)
| Group (Feature *f)
virtual | ~Group ()
void | showMinMax (std::ostream &os, int name_width, const range_t &range, const vector< double > &weights) const
void | showAll (std::ostream &os, int name_width, const range_t &range, const vector< double > &weights) const
void | showTopN (std::ostream &os, int name_width, const range_t &range, const vector< double > &weights, int n) const
void | saveResult (const std::string &directory, const range_t &range, const vector< double > &weights) const
bool | load (const std::string &directory, const range_t &range, vector< double > &weights) const

## Static Public Member Functions
static std::string | name (Direction direction, Direction direction2)

## Public Attributes
Direction | direction
Direction | direction2
CArray2d< unsigned char, 2, Square::SIZE > | target_table
Public Attributes inherited from osl::rating::Group
std::string | group_name

## Detailed Description

Definition at line 13 of file patternGroup.h.

## Constructor & Destructor Documentation

osl::rating::PatternGroup::PatternGroup | ( | Direction | d,
|  | Direction | d2 = `Pattern::INVALID`
| ) |  |
| explicit

Definition at line 6 of file patternGroup.cc.

References osl::BLACK, direction, direction2, osl::Square::index(), osl::rating::Pattern::nextSquare(), osl::playerToIndex(), osl::PTYPE_EDGE, osl::PTYPE_EMPTY, osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, target_table, osl::Square::uintValue(), and osl::WHITE.

## Member Function Documentation

bool osl::rating::PatternGroup::effectiveInCheck | ( | ) |  | const
| inlinevirtual

Reimplemented from osl::rating::Group.

Definition at line 25 of file patternGroup.h.

int osl::rating::PatternGroup::findMatch | ( | const NumEffectState & | state,
|  | Move | m,
|  | const RatingEnv & | env
| ) |  | const
| virtual

Returns
  -1 if not found

Reimplemented from osl::rating::Group.

Definition at line 33 of file patternGroup.cc.

References osl::Piece::EMPTY(), osl::Move::from(), osl::rating::CountEffect2::index(), osl::Square::index(), osl::isPiece(), osl::Square::makeDirect(), osl::rating::Pattern::nextSquare(), osl::Piece::owner(), osl::rating::RatingEnv::pattern_cache, osl::Move::player(), osl::playerToIndex(), osl::Piece::ptype(), osl::Move::ptype(), osl::PTYPE_EMPTY, osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, target, and osl::Move::to().

std::string osl::rating::PatternGroup::name | ( | Direction | direction,
|  | Direction | direction2
| ) |  |
| static

Definition at line 56 of file patternGroup.cc.

References osl::rating::Pattern::INVALID.

void osl::rating::PatternGroup::show | ( | std::ostream & | os,
|  | int | name_width,
|  | const range_t & | range,
|  | const vector< double > & | weights
| ) |  | const
| inlinevirtual

Reimplemented from osl::rating::Group.

Definition at line 19 of file patternGroup.h.

References osl::rating::Group::showTopN().

## Member Data Documentation

Direction osl::rating::PatternGroup::direction

Definition at line 16 of file patternGroup.h.

Referenced by PatternGroup().

Direction osl::rating::PatternGroup::direction2

Definition at line 16 of file patternGroup.h.

Referenced by PatternGroup().

CArray2d<unsigned char, 2, Square::SIZE> osl::rating::PatternGroup::target_table

Definition at line 17 of file patternGroup.h.

Referenced by PatternGroup().

The documentation for this struct was generated from the following files:

- patternGroup.h
- patternGroup.cc