pub struct BitBoard {
pub lo: u128,
pub hi: u128,
}Expand description
225비트를 u128 × 2로 표현 lo: 비트 0~127, hi: 비트 128~224
Fields§
§lo: u128§hi: u128Implementations§
Source§impl BitBoard
impl BitBoard
pub const EMPTY: Self
pub fn get(&self, idx: usize) -> bool
pub fn set(&mut self, idx: usize)
pub fn clear(&mut self, idx: usize)
pub fn or(&self, other: &BitBoard) -> BitBoard
pub fn count_ones(&self) -> u32
Sourcepub fn iter_ones(&self) -> BitBoardIter ⓘ
pub fn iter_ones(&self) -> BitBoardIter ⓘ
Iterate over the indices of set bits, lowest first. Enables feature extraction loops to skip empty cells entirely — critical when the board is sparse (early/midgame), since a stone-driven pass is ~6× cheaper than scanning all 225 cells.
Trait Implementations§
impl Copy for BitBoard
impl Eq for BitBoard
impl StructuralPartialEq for BitBoard
Auto Trait Implementations§
impl Freeze for BitBoard
impl RefUnwindSafe for BitBoard
impl Send for BitBoard
impl Sync for BitBoard
impl Unpin for BitBoard
impl UnsafeUnpin for BitBoard
impl UnwindSafe for BitBoard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more