BitBully 0.0.39
Loading...
Searching...
No Matches
BitBully::OpeningBook Class Reference

Public Member Functions

 OpeningBook (const std::filesystem::path &bookPath, const bool is_8ply, const bool with_distances)
 
 OpeningBook (const std::filesystem::path &bookPath)
 
auto getBook () const
 
void init (const std::filesystem::path &bookPath, const bool is_8ply, const bool with_distances)
 
auto getEntry (const size_t entryIdx) const
 
auto getBookSize () const
 
int getNPly () const
 
int convertValue (const int value, const Board &b) const
 
bool isInBook (const Board &b) const
 
int getBoardValue (const Board &b) const
 

Static Public Member Functions

static std::tuple< key_t, int > readline (std::ifstream &file, const bool with_distances, const bool is_8ply)
 
static std::vector< std::tuple< key_t, value_t > > readBook (const std::filesystem::path &filename, const bool with_distances=true, const bool is_8ply=false)
 
template<typename T>
static int sign (T value)
 

Static Public Attributes

static constexpr auto NONE_VALUE = std::numeric_limits<value_t>::min()
 

Detailed Description

Definition at line 17 of file OpeningBook.h.

Constructor & Destructor Documentation

◆ OpeningBook() [1/2]

BitBully::OpeningBook::OpeningBook ( const std::filesystem::path & bookPath,
const bool is_8ply,
const bool with_distances )
inlineexplicit

Definition at line 59 of file OpeningBook.h.

◆ OpeningBook() [2/2]

BitBully::OpeningBook::OpeningBook ( const std::filesystem::path & bookPath)
inlineexplicit

Definition at line 64 of file OpeningBook.h.

Member Function Documentation

◆ convertValue()

int BitBully::OpeningBook::convertValue ( const int value,
const Board & b ) const
inline

Definition at line 198 of file OpeningBook.h.

◆ getBoardValue()

int BitBully::OpeningBook::getBoardValue ( const Board & b) const
inlinenodiscard

Definition at line 211 of file OpeningBook.h.

◆ getBook()

auto BitBully::OpeningBook::getBook ( ) const
inline

Definition at line 78 of file OpeningBook.h.

◆ getBookSize()

auto BitBully::OpeningBook::getBookSize ( ) const
inlinenodiscard

Definition at line 123 of file OpeningBook.h.

◆ getEntry()

auto BitBully::OpeningBook::getEntry ( const size_t entryIdx) const
inlinenodiscard

Definition at line 119 of file OpeningBook.h.

◆ getNPly()

int BitBully::OpeningBook::getNPly ( ) const
inline

Definition at line 170 of file OpeningBook.h.

◆ init()

void BitBully::OpeningBook::init ( const std::filesystem::path & bookPath,
const bool is_8ply,
const bool with_distances )
inline

Definition at line 80 of file OpeningBook.h.

◆ isInBook()

bool BitBully::OpeningBook::isInBook ( const Board & b) const
inlinenodiscard

Definition at line 206 of file OpeningBook.h.

◆ readBook()

static std::vector< std::tuple< key_t, value_t > > BitBully::OpeningBook::readBook ( const std::filesystem::path & filename,
const bool with_distances = true,
const bool is_8ply = false )
inlinestatic

Definition at line 172 of file OpeningBook.h.

◆ readline()

static std::tuple< key_t, int > BitBully::OpeningBook::readline ( std::ifstream & file,
const bool with_distances,
const bool is_8ply )
inlinestatic

Definition at line 125 of file OpeningBook.h.

◆ sign()

template<typename T>
static int BitBully::OpeningBook::sign ( T value)
inlinestatic

Definition at line 194 of file OpeningBook.h.

Member Data Documentation

◆ NONE_VALUE

auto BitBully::OpeningBook::NONE_VALUE = std::numeric_limits<value_t>::min()
staticconstexpr

Definition at line 57 of file OpeningBook.h.


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