osl::rating::BradleyTerry Class 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
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
osl::rating::BradleyTerry Class Reference

`#include <bradleyTerry.h>`

Collaboration diagram for osl::rating::BradleyTerry:
[legend]

## Classes
class | Thread

## Public Member Functions
| BradleyTerry (FeatureSet &features, const std::string &kisen_file, int kisen_start=0)
| ~BradleyTerry ()
void | setNumCpus (int new_num_cpus)
void | setNumRecords (size_t new_num_records)
void | setOutputDirectory (const std::string &new_output)
void | setFixGroup (int new_fix_group)
void | setVerbose (int new_verbose)
void | setMinRating (int new_min)
void | iterate ()

## Private Types
typedef std::valarray< double > | valarray_t

## Private Member Functions
void | update (size_t g)
bool | addSquare (size_t g, const NumEffectState &state, const RatingEnv &env, Move selected, valarray_t &wins, std::valarray< long double > &denominator) const
size_t | accumulate (size_t g, size_t first, size_t last, valarray_t &wins, std::valarray< long double > &denominator) const

## Private Attributes
FeatureSet & | features
std::string | kisen_filename
std::string | output_directory
int | kisen_start
size_t | num_cpus
size_t | num_records
int | verbose
int | fix_group
size_t | min_rating

## Friends
class | Thread

## Detailed Description

Definition at line 13 of file bradleyTerry.h.

## Member Typedef Documentation

typedef std::valarray<double> osl::rating::BradleyTerry::valarray_t
| private

Definition at line 15 of file bradleyTerry.h.

## Constructor & Destructor Documentation

osl::rating::BradleyTerry::BradleyTerry | ( | FeatureSet & | features,
|  | const std::string & | kisen_file,
|  | int | kisen_start = `0`
| ) |  |

Definition at line 16 of file bradleyTerry.cc.

osl::rating::BradleyTerry::~BradleyTerry | ( | ) |  |

Definition at line 22 of file bradleyTerry.cc.

## Member Function Documentation

size_t osl::rating::BradleyTerry::accumulate | ( | size_t | g,
|  | size_t | first,
|  | size_t | last,
|  | valarray_t & | wins,
|  | std::valarray< long double > & | denominator
| ) |  | const
| private

Definition at line 101 of file bradleyTerry.cc.

References addSquare(), osl::BLACK, osl::checkmate::ImmediateCheckmate::hasCheckmateMove(), kisen_filename, kisen_start, osl::rating::BradleyTerry::Thread::last, osl::rating::RatingEnv::make(), min_rating, min_rating, moves, osl::rating::BradleyTerry::Thread::skip, and osl::WHITE.

Referenced by update().

bool osl::rating::BradleyTerry::addSquare | ( | size_t | g,
|  | const NumEffectState & | state,
|  | const RatingEnv & | env,
|  | Move | selected,
|  | valarray_t & | wins,
|  | std::valarray< long double > & | denominator
| ) |  | const
| private

Definition at line 27 of file bradleyTerry.cc.

References count, osl::move_generator::capture::generate(), and moves.

Referenced by accumulate().

void osl::rating::BradleyTerry::iterate | ( | ) |  |

Definition at line 191 of file bradleyTerry.cc.

References update().

void osl::rating::BradleyTerry::setFixGroup | ( | int | new_fix_group) |  |
| inline

Definition at line 31 of file bradleyTerry.h.

References fix_group.

void osl::rating::BradleyTerry::setMinRating | ( | int | new_min) |  |
| inline

Definition at line 33 of file bradleyTerry.h.

References min_rating.

void osl::rating::BradleyTerry::setNumCpus | ( | int | new_num_cpus) |  |
| inline

Definition at line 28 of file bradleyTerry.h.

References num_cpus.

void osl::rating::BradleyTerry::setNumRecords | ( | size_t | new_num_records) |  |
| inline

Definition at line 29 of file bradleyTerry.h.

References num_records.

void osl::rating::BradleyTerry::setOutputDirectory | ( | const std::string & | new_output) |  |
| inline

Definition at line 30 of file bradleyTerry.h.

References output_directory.

void osl::rating::BradleyTerry::setVerbose | ( | int | new_verbose) |  |
| inline

Definition at line 32 of file bradleyTerry.h.

References verbose.

void osl::rating::BradleyTerry::update | ( | size_t | g) |  |
| private

Definition at line 139 of file bradleyTerry.cc.

References accumulate(), osl::rating::BradleyTerry::Thread::denominator, kisen_filename, num_cpus, num_records, osl::rating::BradleyTerry::Thread::skip, osl::rating::BradleyTerry::Thread::Thread(), and osl::rating::BradleyTerry::Thread::wins.

Referenced by iterate().

## Friends And Related Function Documentation

friend class Thread
| friend

Definition at line 42 of file bradleyTerry.h.

## Member Data Documentation

FeatureSet& osl::rating::BradleyTerry::features
| private

Definition at line 16 of file bradleyTerry.h.

int osl::rating::BradleyTerry::fix_group
| private

Definition at line 22 of file bradleyTerry.h.

Referenced by setFixGroup().

std::string osl::rating::BradleyTerry::kisen_filename
| private

Definition at line 18 of file bradleyTerry.h.

int osl::rating::BradleyTerry::kisen_start
| private

Definition at line 19 of file bradleyTerry.h.

size_t osl::rating::BradleyTerry::min_rating
| private

Definition at line 23 of file bradleyTerry.h.

Referenced by accumulate(), and setMinRating().

size_t osl::rating::BradleyTerry::num_cpus
| private

Definition at line 20 of file bradleyTerry.h.

Referenced by setNumCpus(), and update().

size_t osl::rating::BradleyTerry::num_records
| private

Definition at line 20 of file bradleyTerry.h.

Referenced by setNumRecords(), and update().

std::string osl::rating::BradleyTerry::output_directory
| private

Definition at line 18 of file bradleyTerry.h.

Referenced by setOutputDirectory().

int osl::rating::BradleyTerry::verbose
| private

Definition at line 21 of file bradleyTerry.h.

Referenced by setVerbose().

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

- bradleyTerry.h
- bradleyTerry.cc