osl::rating::PatternGroup Struct Reference

`#include <patternGroup.h>`

Inheritance diagram for osl::rating::PatternGroup:

## Public Member Functions

| PatternGroup (Direction d, Direction d2=Pattern::INVALID)
void | show (std::ostream &os, int name_width, const range_t &range, const std::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 std::vector< double > &weights) const
void | showAll (std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
void | showTopN (std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights, int n) const
void | saveResult (const std::string &directory, const range_t &range, const std::vector< double > &weights) const
bool | load (const std::string &directory, const range_t &range, std::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

## PatternGroup()

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::rating::Group::Group(), osl::Square::index(), name(), 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

## effectiveInCheck()

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

inline virtual

Reimplemented from osl::rating::Group.

Definition at line 25 of file patternGroup.h.

## findMatch()

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 direction, direction2, 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::SimpleState::pieceAt(), osl::Move::player(), osl::playerToIndex(), osl::Move::ptype(), osl::Piece::ptype(), osl::PTYPE_EMPTY, osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, target_table, and osl::Move::to().

## name()

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

static

Definition at line 56 of file patternGroup.cc.

References direction, direction2, and osl::rating::Pattern::INVALID.

Referenced by PatternGroup().

## show()

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

inline virtual

Reimplemented from osl::rating::Group.

Definition at line 19 of file patternGroup.h.

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

## Member Data Documentation

## direction

Direction osl::rating::PatternGroup::direction

Definition at line 16 of file patternGroup.h.

Referenced by findMatch(), name(), and PatternGroup().

## direction2

Direction osl::rating::PatternGroup::direction2

Definition at line 16 of file patternGroup.h.

Referenced by findMatch(), name(), and PatternGroup().

## target_table

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

Definition at line 17 of file patternGroup.h.

Referenced by findMatch(), and PatternGroup().

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

- patternGroup.h
- patternGroup.cc