Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
osl::rating::FeatureSet Class Reference

#include <featureSet.h>

Inheritance diagram for osl::rating::FeatureSet:
osl::rating::CaptureSet osl::rating::StandardFeatureSet osl::rating::TacticalSet

Classes

struct  Statistics
 

Public Member Functions

 FeatureSet ()
 
virtual ~FeatureSet ()
 
bool tryLoad (const std::string &input_directory)
 
void setWeight (size_t feature_id, const double &value)
 
const Groupgroup (size_t group_id) const
 
bool effectiveInCheck (size_t group_id) const
 
const Featurefeature (size_t feature_id) const
 
const range_trange (size_t group) const
 
const double & weight (size_t feature_id) const
 
size_t groupSize () const
 
size_t featureSize () const
 
const RatedMove makeRate (const NumEffectState &state, bool in_check, const RatingEnv &env, Move move) const
 
const RatedMove makeRateWithCut (const NumEffectState &state, bool in_check, const RatingEnv &env, int limit, Move move) const
 
const std::string annotate (const NumEffectState &state, const RatingEnv &env, Move move) const
 
void generateRating (const NumEffectState &state, const RatingEnv &env, int limit, RatedMoveVector &out, bool in_pv_or_all=true) const
 
void generateLogProb (const NumEffectState &state, const RatingEnv &env, int limit, MoveLogProbVector &out, bool in_pv_or_all=true) const
 
int logProbTakeBack (const NumEffectState &state, const RatingEnv &env, Move) const
 
int logProbSeePlus (const NumEffectState &state, const RatingEnv &env, Move) const
 
int logProbKingEscape (const NumEffectState &state, const RatingEnv &env, Move) const
 
void showGroup (std::ostream &, size_t group_id) const
 
void save (const std::string &output_directory, size_t group_id) const
 
void showStatistics (std::ostream &) const
 

Static Public Member Functions

static void normalize (const RatedMoveVector &, MoveLogProbVector &out)
 
static std::string defaultDirectory ()
 

Protected Member Functions

void add (Feature *f)
 
void add (Group *g)
 
void add (CaptureGroup *g)
 
void add (SendOffGroup *g)
 
void add (CheckmateIfCaptureGroup *g)
 
void addCommon (Group *g)
 
void addFinished ()
 

Private Member Functions

 FeatureSet (const FeatureSet &)=delete
 
FeatureSetoperator= (const FeatureSet &)=delete
 
const range_t makeRange (size_t group) const
 
int rating (const NumEffectState &state, const RatingEnv &env, Move move, size_t group_id) const
 

Private Attributes

boost::ptr_vector< Groupgroups
 
std::vector< char > effective_in_check
 
std::vector< Feature * > features
 
std::vector< range_tranges
 
std::vector< double > weights
 
std::vector< int > weightslog10
 
int capture_group
 makeRateで特別扱いのgroup More...
 
int checkmate_if_capture_group
 
int sendoff_group
 
std::vector< char > normal_groups
 
std::vector< CArray< stat::Average, 8 > > frequency
 統計測定用 More...
 
std::vector< CArray< stat::Variance, 8 > > variance_match
 
std::vector< stat::Variancevariance_all
 
std::vector< Statisticsstatistics
 

Detailed Description

Definition at line 30 of file rating/featureSet.h.

Constructor & Destructor Documentation

§ FeatureSet() [1/2]

osl::rating::FeatureSet::FeatureSet ( const FeatureSet )
privatedelete

§ FeatureSet() [2/2]

osl::rating::FeatureSet::FeatureSet ( )

Definition at line 52 of file featureSet.cc.

References ~FeatureSet().

Referenced by osl::rating::FeatureSet::Statistics::Statistics().

§ ~FeatureSet()

osl::rating::FeatureSet::~FeatureSet ( )
virtual

Definition at line 58 of file featureSet.cc.

References makeRange(), and showStatistics().

Referenced by FeatureSet().

Member Function Documentation

§ add() [1/5]

void osl::rating::FeatureSet::add ( Feature f)
protected

§ add() [2/5]

void osl::rating::FeatureSet::add ( Group g)
protected

Definition at line 112 of file featureSet.cc.

References add(), addCommon(), and normal_groups.

§ add() [3/5]

void osl::rating::FeatureSet::add ( CaptureGroup g)
protected

Definition at line 119 of file featureSet.cc.

References add(), addCommon(), capture_group, and normal_groups.

§ add() [4/5]

void osl::rating::FeatureSet::add ( SendOffGroup g)
protected

Definition at line 127 of file featureSet.cc.

References add(), addCommon(), normal_groups, and sendoff_group.

§ add() [5/5]

void osl::rating::FeatureSet::add ( CheckmateIfCaptureGroup g)
protected

Definition at line 135 of file featureSet.cc.

References addCommon(), checkmate_if_capture_group, normal_groups, and tryLoad().

§ addCommon()

void osl::rating::FeatureSet::addCommon ( Group g)
protected

Definition at line 101 of file featureSet.cc.

References add(), effective_in_check, osl::rating::Group::effectiveInCheck(), features, and groups.

Referenced by add().

§ addFinished()

void osl::rating::FeatureSet::addFinished ( )
protected

§ annotate()

const std::string osl::rating::FeatureSet::annotate ( const NumEffectState state,
const RatingEnv env,
Move  move 
) const

§ defaultDirectory()

std::string osl::rating::FeatureSet::defaultDirectory ( )
static

§ effectiveInCheck()

bool osl::rating::FeatureSet::effectiveInCheck ( size_t  group_id) const
inline

§ feature()

const Feature& osl::rating::FeatureSet::feature ( size_t  feature_id) const
inline

Definition at line 59 of file rating/featureSet.h.

Referenced by osl::rating::BradleyTerry::update().

§ featureSize()

size_t osl::rating::FeatureSet::featureSize ( ) const
inline

§ generateLogProb()

void osl::rating::FeatureSet::generateLogProb ( const NumEffectState state,
const RatingEnv env,
int  limit,
MoveLogProbVector out,
bool  in_pv_or_all = true 
) const

§ generateRating()

void osl::rating::FeatureSet::generateRating ( const NumEffectState state,
const RatingEnv env,
int  limit,
RatedMoveVector out,
bool  in_pv_or_all = true 
) const

§ group()

const Group& osl::rating::FeatureSet::group ( size_t  group_id) const
inline

Definition at line 57 of file rating/featureSet.h.

Referenced by osl::rating::BradleyTerry::addSquare(), save(), and showGroup().

§ groupSize()

size_t osl::rating::FeatureSet::groupSize ( ) const
inline

§ logProbKingEscape()

int osl::rating::FeatureSet::logProbKingEscape ( const NumEffectState state,
const RatingEnv env,
Move  move 
) const

§ logProbSeePlus()

int osl::rating::FeatureSet::logProbSeePlus ( const NumEffectState state,
const RatingEnv env,
Move  move 
) const

§ logProbTakeBack()

int osl::rating::FeatureSet::logProbTakeBack ( const NumEffectState state,
const RatingEnv env,
Move  move 
) const

§ makeRange()

const osl::rating::range_t osl::rating::FeatureSet::makeRange ( size_t  group) const
private

Definition at line 66 of file featureSet.cc.

References addFinished(), and groups.

Referenced by addFinished(), and ~FeatureSet().

§ makeRate()

const osl::rating::RatedMove osl::rating::FeatureSet::makeRate ( const NumEffectState state,
bool  in_check,
const RatingEnv env,
Move  move 
) const

§ makeRateWithCut()

const osl::rating::RatedMove osl::rating::FeatureSet::makeRateWithCut ( const NumEffectState state,
bool  in_check,
const RatingEnv env,
int  limit,
Move  move 
) const

§ normalize()

static void osl::rating::FeatureSet::normalize ( const RatedMoveVector ,
MoveLogProbVector out 
)
static

§ operator=()

FeatureSet& osl::rating::FeatureSet::operator= ( const FeatureSet )
privatedelete

§ range()

const range_t& osl::rating::FeatureSet::range ( size_t  group) const
inline

§ rating()

int osl::rating::FeatureSet::rating ( const NumEffectState state,
const RatingEnv env,
Move  move,
size_t  group_id 
) const
private

§ save()

void osl::rating::FeatureSet::save ( const std::string &  output_directory,
size_t  group_id 
) const

§ setWeight()

void osl::rating::FeatureSet::setWeight ( size_t  feature_id,
const double &  value 
)

Definition at line 193 of file featureSet.cc.

References generateRating(), weights, and weightslog10.

Referenced by tryLoad(), and osl::rating::BradleyTerry::update().

§ showGroup()

void osl::rating::FeatureSet::showGroup ( std::ostream &  os,
size_t  group_id 
) const

Definition at line 642 of file featureSet.cc.

References group(), range(), save(), osl::rating::Group::show(), and weights.

Referenced by annotate(), and osl::rating::BradleyTerry::update().

§ showStatistics()

void osl::rating::FeatureSet::showStatistics ( std::ostream &  os) const

Definition at line 655 of file featureSet.cc.

References frequency, groups, variance_all, and variance_match.

Referenced by save(), and ~FeatureSet().

§ tryLoad()

bool osl::rating::FeatureSet::tryLoad ( const std::string &  input_directory)

§ weight()

const double& osl::rating::FeatureSet::weight ( size_t  feature_id) const
inline

Member Data Documentation

§ capture_group

int osl::rating::FeatureSet::capture_group
private

makeRateで特別扱いのgroup

Definition at line 43 of file rating/featureSet.h.

Referenced by add(), makeRate(), and makeRateWithCut().

§ checkmate_if_capture_group

int osl::rating::FeatureSet::checkmate_if_capture_group
private

Definition at line 43 of file rating/featureSet.h.

Referenced by add(), makeRate(), and makeRateWithCut().

§ effective_in_check

std::vector<char> osl::rating::FeatureSet::effective_in_check
private

Definition at line 37 of file rating/featureSet.h.

Referenced by addCommon().

§ features

std::vector<Feature*> osl::rating::FeatureSet::features
private

Definition at line 38 of file rating/featureSet.h.

Referenced by addCommon(), addFinished(), and tryLoad().

§ frequency

std::vector<CArray<stat::Average,8> > osl::rating::FeatureSet::frequency
mutableprivate

統計測定用

Definition at line 46 of file rating/featureSet.h.

Referenced by addFinished(), rating(), and showStatistics().

§ groups

boost::ptr_vector<Group> osl::rating::FeatureSet::groups
private

§ normal_groups

std::vector<char> osl::rating::FeatureSet::normal_groups
private

Definition at line 44 of file rating/featureSet.h.

Referenced by add(), addFinished(), and makeRate().

§ ranges

std::vector<range_t> osl::rating::FeatureSet::ranges
private

Definition at line 39 of file rating/featureSet.h.

Referenced by addFinished(), annotate(), rating(), and tryLoad().

§ sendoff_group

int osl::rating::FeatureSet::sendoff_group
private

Definition at line 43 of file rating/featureSet.h.

Referenced by add(), and makeRate().

§ statistics

std::vector<Statistics> osl::rating::FeatureSet::statistics
private

Definition at line 49 of file rating/featureSet.h.

Referenced by addFinished(), makeRateWithCut(), and tryLoad().

§ variance_all

std::vector<stat::Variance> osl::rating::FeatureSet::variance_all
mutableprivate

Definition at line 48 of file rating/featureSet.h.

Referenced by addFinished(), rating(), and showStatistics().

§ variance_match

std::vector<CArray<stat::Variance,8> > osl::rating::FeatureSet::variance_match
mutableprivate

Definition at line 47 of file rating/featureSet.h.

Referenced by addFinished(), rating(), and showStatistics().

§ weights

std::vector<double> osl::rating::FeatureSet::weights
private

Definition at line 40 of file rating/featureSet.h.

Referenced by addFinished(), save(), setWeight(), showGroup(), and tryLoad().

§ weightslog10

std::vector<int> osl::rating::FeatureSet::weightslog10
private

Definition at line 41 of file rating/featureSet.h.

Referenced by addFinished(), annotate(), rating(), setWeight(), and tryLoad().


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