|
HooverChessUtils_PgnReader 0.9.0
|
Position compressor that produces fixed-length output (192 bits). More...
#include <position-compress-fixed.h>
Static Public Member Functions | |
| static void | compress (const ChessBoard &board, CompressedPosition_FixedLength &out_compressedPosition) |
| Compresses a chess position with at most 32 pieces. | |
| static void | decompress (const CompressedPosition_FixedLength &compressedPosition, std::uint8_t halfMoveClock, std::uint32_t moveNum, pgn_reader::ChessBoard &out_board) |
| Compresses a chess position with at most 32 pieces. | |
Private Member Functions | |
| PositionCompressor_FixedLength ()=delete | |
| ~PositionCompressor_FixedLength ()=delete | |
Position compressor that produces fixed-length output (192 bits).
The position compressor can compress/decompress all legal positions with 32 pieces or less.
|
privatedelete |
|
privatedelete |
|
static |
Compresses a chess position with at most 32 pieces.
| [in] | board | Position |
| [out] | out_compressedPosition | Compressed position |
| std::out_of_range | The position has more than 32 pieces. |
See CompressedPosition_FixedLength for the specication of position encoding.
|
static |
Compresses a chess position with at most 32 pieces.
| [in] | compressedPosition | Compressed position |
| [in] | halfMoveClock | Half-move clock |
| [in] | moveNum | Move number |
| [out] | out_board | ChessBoard to be set with position represented by compressedPosition |
| std::out_of_range | Bad compressed format |
| PgnError | Illegal position |
See CompressedPosition_FixedLength for the specication of position encoding.