pub struct DomainBitset { /* private fields */ }Expand description
A simple bitset wrapped around a Vec<u64>.
This structure is used to track which entities have components in a specific
SemanticDomain. It allows for extremely fast (bitwise) filtering during
transversal queries.
Implementations§
Source§impl DomainBitset
impl DomainBitset
Sourcepub fn get_block(&self, word_idx: usize) -> u64
pub fn get_block(&self, word_idx: usize) -> u64
Returns the 64-bit block at the specified word index. Returns 0 if the index is out of bounds.
Sourcepub fn is_set(&self, index: u32) -> bool
pub fn is_set(&self, index: u32) -> bool
Returns true if the bit at the specified index is set.
Sourcepub fn intersect(&mut self, other: &DomainBitset)
pub fn intersect(&mut self, other: &DomainBitset)
Performs a bitwise AND with another bitset.
Trait Implementations§
Source§impl Clone for DomainBitset
impl Clone for DomainBitset
Source§fn clone(&self) -> DomainBitset
fn clone(&self) -> DomainBitset
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DomainBitset
impl Debug for DomainBitset
Source§impl Default for DomainBitset
impl Default for DomainBitset
Source§fn default() -> DomainBitset
fn default() -> DomainBitset
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DomainBitset
impl RefUnwindSafe for DomainBitset
impl Send for DomainBitset
impl Sync for DomainBitset
impl Unpin for DomainBitset
impl UnwindSafe for DomainBitset
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