17#ifndef HOOVER_CHESS_UTILS__PGN_READER__POSITION_COMPRESS_FIXED_H_INCLUDED
18#define HOOVER_CHESS_UTILS__PGN_READER__POSITION_COMPRESS_FIXED_H_INCLUDED
183 using RawCompareType = std::array<std::uint64_t, 3U>;
186 const RawCompareType *p1 { std::bit_cast<const RawCompareType *>(&lhs) };
187 const RawCompareType *p2 { std::bit_cast<const RawCompareType *>(&rhs) };
199 using RawCompareType = std::array<std::uint64_t, 3U>;
202 const RawCompareType *p1 { std::bit_cast<const RawCompareType *>(&lhs) };
203 const RawCompareType *p2 { std::bit_cast<const RawCompareType *>(&rhs) };
The chessboard.
Definition chessboard.h:589
Position compressor that produces fixed-length output (192 bits).
Definition position-compress-fixed.h:213
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.
~PositionCompressor_FixedLength()=delete
PositionCompressor_FixedLength()=delete
bool operator==(const CompressedPosition_FixedLength &lhs, const CompressedPosition_FixedLength &rhs) noexcept
Equality comparison operator.
Definition position-compress-fixed.h:197
auto operator<=>(const CompressedPosition_FixedLength &lhs, const CompressedPosition_FixedLength &rhs) noexcept
Three-way comparison operator (spaceship). The comparison provides strong ordering.
Definition position-compress-fixed.h:181
CompressedPosition_PieceEncoding
Compressed piece encoding for fixed-length compressed position.
Definition position-compress-fixed.h:38
@ WHITE_KNIGHT
White knight.
@ BLACK_BISHOP
Black bishop.
@ WHITE_BISHOP
White bishop.
@ BLACK_KNIGHT
Black knight.
@ BLACK_QUEEN
Black queen.
@ WHITE_QUEEN
White queen.
@ EP_PAWN
En-passant capturable pawn.
@ WHITE_ROOK_CANNOT_CASTLE
White rook (no castling rights)
@ BLACK_ROOK_CANNOT_CASTLE
Black rook, no castling rights.
@ WHITE_ROOK_CAN_CASTLE
White rook, has castling rights.
@ WHITE_KING_IN_TURN
White king, white to move.
@ BLACK_ROOK_CAN_CASTLE
Black rook, has castling rights.
@ WHITE_KING_NOT_IN_TURN
White king, white to move.
Definition chessboard-types-squareset.h:30
A position encoded in 192 bits.
Definition position-compress-fixed.h:155
std::uint64_t occupancy
Occupancy mask.
Definition position-compress-fixed.h:159
std::array< std::uint32_t, 4U > dataPlanes
Data planes.
Definition position-compress-fixed.h:162