pub struct SimpleVob { /* private fields */ }Implementations§
Source§impl SimpleVob
impl SimpleVob
pub fn new() -> Self
pub fn from_slice(bits: &[bool]) -> Self
pub fn alloc(size: usize) -> Self
pub fn alloc_ones(size: usize) -> Self
pub fn alloc_with_capacity(size: usize, capacity: usize) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn num_set(&self) -> usize
pub fn to_bin_string(&self) -> String
pub fn negated(&self) -> Self
pub fn as_ptr(&self) -> *const u32
pub fn as_slice(&self) -> &[u32]
pub fn iter_set_entries(&self, f: impl FnMut(usize))
pub fn iter_unset_entries(&self, f: impl FnMut(usize))
pub fn iter_entries(&self, f: impl FnMut(bool, usize))
pub fn write_to(&self, buf: &mut [u8])
pub fn allow_token(&mut self, tok: u32)
pub fn disallow_token(&mut self, tok: u32)
pub fn set(&mut self, idx: usize, val: bool)
pub fn allow_range(&mut self, range: RangeInclusive<u32>)
pub fn resize(&mut self, size: usize)
pub fn get(&self, idx: usize) -> bool
pub fn is_allowed(&self, tok: u32) -> bool
pub fn set_all(&mut self, val: bool)
pub fn apply_to(&self, logits: &mut [f32])
pub fn iter(&self) -> SimpleVobIter<'_> ⓘ
pub fn set_from(&mut self, other: &SimpleVob)
pub fn or(&mut self, other: &SimpleVob)
pub fn trim_trailing_zeros(&mut self)
pub fn and(&mut self, other: &SimpleVob)
pub fn is_zero(&self) -> bool
pub fn and_is_zero(&self, other: &SimpleVob) -> bool
pub fn sub(&mut self, other: &SimpleVob)
pub fn first_bit_set_here_and_in(&self, other: &SimpleVob) -> Option<usize>
pub fn first_bit_set(&self) -> Option<usize>
pub fn to_list(&self) -> Vec<u32>
Trait Implementations§
impl Eq for SimpleVob
Auto Trait Implementations§
impl Freeze for SimpleVob
impl RefUnwindSafe for SimpleVob
impl Send for SimpleVob
impl Sync for SimpleVob
impl Unpin for SimpleVob
impl UnwindSafe for SimpleVob
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