osl::move_probability::FeatureSet Class Reference

`#include <featureSet.h>`

Inheritance diagram for osl::move_probability::FeatureSet:

## Public Member Functions

| ~FeatureSet ()
void | pushBack (Feature *, bool light=false)
void | addFinished ()
int | dimension () const
double | matchExp (const StateInfo &, Move, const double *weights) const
double | matchNoExp (const StateInfo &, Move, const double *weights) const
void | generateLogProb (const StateInfo &state, MoveLogProbVector &out, const double *weights) const
double | matchLight (const StateInfo &, Move, const double *weights) const
bool | load (const char *base_filename, double *weights) const
bool | load_binary (const char *base_filename, double *weights) const
void | showSummary (const double *weights) const
void | analyze (const StateInfo &state, Move move, const double *weights) const
double | generateRating (const StateInfo &state, WeightedMoveVector &out, const double *weights) const

## Static Public Member Functions

static void | ratingToLogProb (const WeightedMoveVector &rating, double sum, MoveLogProbVector &out)

## Protected Member Functions

| FeatureSet ()

## Private Attributes

boost::ptr_vector< Feature > | features
std::vector< int > | offsets
std::vector< int > | light_features

## Detailed Description

Definition at line 21 of file move_probability/featureSet.h.

## Constructor & Destructor Documentation

## FeatureSet()

osl::move_probability::FeatureSet::FeatureSet | ( |  | ) |

protected

Definition at line 22 of file featureSet_.cc.

## ~FeatureSet()

osl::move_probability::FeatureSet::~FeatureSet | ( |  | ) |

Definition at line 27 of file featureSet_.cc.

## Member Function Documentation

## addFinished()

void osl::move_probability::FeatureSet::addFinished | ( |  | ) |

Definition at line 40 of file featureSet_.cc.

References dimension(), features, and offsets.

Referenced by osl::move_probability::StandardFeatureSet::StandardFeatureSet().

## analyze()

void osl::move_probability::FeatureSet::analyze | ( | const StateInfo & | state,
|  | Move | move,
|  | const double * | weights ) const

Definition at line 80 of file featureSet_.cc.

References features, offsets, and osl::csa::show().

## dimension()

int osl::move_probability::FeatureSet::dimension | ( |  | ) | const

inline

Definition at line 31 of file move_probability/featureSet.h.

References offsets.

Referenced by addFinished(), load(), load_binary(), and osl::move_probability::StandardFeatureSet::setUp().

## generateLogProb()

void osl::move_probability::FeatureSet::generateLogProb | ( | const StateInfo & | state,
|  | MoveLogProbVector & | out,
|  | const double * | weights ) const

Definition at line 134 of file featureSet_.cc.

References generateRating(), and ratingToLogProb().

Referenced by osl::move_probability::StandardFeatureSet::generateLogProb().

## generateRating()

double osl::move_probability::FeatureSet::generateRating | ( | const StateInfo & | state,
|  | WeightedMoveVector & | out,
|  | const double * | weights ) const

Definition at line 102 of file featureSet_.cc.

References osl::move_probability::StateInfo::dirty, osl::NumEffectState::generateLegal(), matchExp(), osl::FixedCapacityVector< T, Capacity >::push_back(), and osl::move_probability::StateInfo::state.

Referenced by generateLogProb(), and osl::move_probability::StandardFeatureSet::generateLogProb2().

## load()

bool osl::move_probability::FeatureSet::load | ( | const char * | base_filename,
|  | double * | weights ) const

Definition at line 143 of file featureSet_.cc.

References dimension().

## load_binary()

bool osl::move_probability::FeatureSet::load_binary | ( | const char * | base_filename,
|  | double * | weights ) const

Definition at line 160 of file featureSet_.cc.

References dimension(), osl::misc::BinaryElementReader< T >::hasNext(), and osl::misc::BinaryElementReader< T >::read().

Referenced by osl::move_probability::StandardFeatureSet::setUp().

## matchExp()

double osl::move_probability::FeatureSet::matchExp | ( | const StateInfo & | state,
|  | Move | move,
|  | const double * | weights ) const

Definition at line 61 of file featureSet_.cc.

References matchNoExp().

Referenced by generateRating(), and osl::move_probability::StandardFeatureSet::matchExp().

## matchLight()

double osl::move_probability::FeatureSet::matchLight | ( | const StateInfo & | state,
|  | Move | move,
|  | const double * | weights ) const

Definition at line 67 of file featureSet_.cc.

References features, light_features, and offsets.

Referenced by osl::move_probability::StandardFeatureSet::matchLight().

## matchNoExp()

double osl::move_probability::FeatureSet::matchNoExp | ( | const StateInfo & | state,
|  | Move | move,
|  | const double * | weights ) const

Definition at line 49 of file featureSet_.cc.

References features, and offsets.

Referenced by matchExp(), and osl::move_probability::StandardFeatureSet::matchNoExp().

## pushBack()

void osl::move_probability::FeatureSet::pushBack | ( | Feature * | f,
|  | bool | light = false )

Definition at line 32 of file featureSet_.cc.

References features, and light_features.

Referenced by osl::move_probability::StandardFeatureSet::StandardFeatureSet().

## ratingToLogProb()

void osl::move_probability::FeatureSet::ratingToLogProb | ( | const WeightedMoveVector & | rating,
|  | double | sum,
|  | MoveLogProbVector & | out )

static

Definition at line 119 of file featureSet_.cc.

References osl::container::MoveLogProbVector::push_back(), and osl::container::MoveLogProbVector::sortByProbability().

Referenced by generateLogProb().

## showSummary()

void osl::move_probability::FeatureSet::showSummary | ( | const double * | weights | ) | const

Definition at line 179 of file featureSet_.cc.

References osl::move_probability::Feature::dimension(), features, osl::move_probability::Feature::name(), and offsets.

## Member Data Documentation

## features

boost::ptr_vector<Feature> osl::move_probability::FeatureSet::features

private

Definition at line 23 of file move_probability/featureSet.h.

Referenced by addFinished(), analyze(), matchLight(), matchNoExp(), pushBack(), and showSummary().

## light_features

std::vector<int> osl::move_probability::FeatureSet::light_features

private

Definition at line 24 of file move_probability/featureSet.h.

Referenced by matchLight(), and pushBack().

## offsets

std::vector<int> osl::move_probability::FeatureSet::offsets

private

Definition at line 24 of file move_probability/featureSet.h.

Referenced by addFinished(), analyze(), dimension(), matchLight(), matchNoExp(), and showSummary().

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

- move_probability/featureSet.h
- featureSet_.cc