[−][src]Struct bitset_fixed::BitSet
Fixed sized bitset
Methods
impl BitSet
[src]
pub fn new(size: usize) -> BitSet
[src]
Construct a new, zero bitset with specified capacity. This method allocates O(size) bits
pub fn set(&mut self, i: usize, b: bool)
[src]
Set i-th bit to b
pub fn size(&self) -> usize
[src]
Get the size of bits
pub fn count_ones(&self) -> u32
[src]
Get the number of ones
pub fn count_zeros(&self) -> u32
[src]
Get the number of zeros
pub fn shl_or(&mut self, x: usize)
[src]
Faster left shift and or
bitset | (bitset << x)
pub fn buffer(&self) -> &[u64]
[src]
Get inner buffer
pub fn buffer_mut(&mut self) -> &mut [u64]
[src]
Get inner buffer with mutable reference
pub fn chomp(&mut self)
[src]
Set tailing bits in inner buffer whose index are greater than size to 0
Trait Implementations
impl PartialOrd<BitSet> for BitSet
[src]
fn partial_cmp(&self, other: &BitSet) -> Option<Ordering>
[src]
fn lt(&self, other: &BitSet) -> bool
[src]
fn le(&self, other: &BitSet) -> bool
[src]
fn gt(&self, other: &BitSet) -> bool
[src]
fn ge(&self, other: &BitSet) -> bool
[src]
impl PartialEq<BitSet> for BitSet
[src]
impl Ord for BitSet
[src]
fn cmp(&self, other: &BitSet) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl Eq for BitSet
[src]
impl Clone for BitSet
[src]
fn clone(&self) -> BitSet
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for BitSet
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Not for BitSet
[src]
type Output = Self
The resulting type after applying the !
operator.
fn not(self) -> Self::Output
[src]
impl<'a> Not for &'a BitSet
[src]
type Output = BitSet
The resulting type after applying the !
operator.
fn not(self) -> Self::Output
[src]
impl<'a> BitAnd<&'a BitSet> for BitSet
[src]
type Output = Self
The resulting type after applying the &
operator.
fn bitand(self, rhs: &'a Self) -> Self::Output
[src]
impl<'a, 'b> BitAnd<&'b BitSet> for &'a BitSet
[src]
type Output = BitSet
The resulting type after applying the &
operator.
fn bitand(self, rhs: &'b BitSet) -> Self::Output
[src]
impl<'a> BitOr<&'a BitSet> for BitSet
[src]
type Output = Self
The resulting type after applying the |
operator.
fn bitor(self, rhs: &'a Self) -> Self::Output
[src]
impl<'a, 'b> BitOr<&'b BitSet> for &'a BitSet
[src]
type Output = BitSet
The resulting type after applying the |
operator.
fn bitor(self, rhs: &'b BitSet) -> Self::Output
[src]
impl<'a> BitXor<&'a BitSet> for BitSet
[src]
type Output = Self
The resulting type after applying the ^
operator.
fn bitxor(self, rhs: &'a Self) -> Self
[src]
impl<'a, 'b> BitXor<&'b BitSet> for &'a BitSet
[src]
type Output = BitSet
The resulting type after applying the ^
operator.
fn bitxor(self, rhs: &'b BitSet) -> Self::Output
[src]
impl Shl<usize> for BitSet
[src]
type Output = Self
The resulting type after applying the <<
operator.
fn shl(self, x: usize) -> Self
[src]
impl<'a> Shl<usize> for &'a BitSet
[src]
type Output = BitSet
The resulting type after applying the <<
operator.
fn shl(self, x: usize) -> Self::Output
[src]
impl Shr<usize> for BitSet
[src]
type Output = Self
The resulting type after applying the >>
operator.
fn shr(self, x: usize) -> Self
[src]
impl<'a> Shr<usize> for &'a BitSet
[src]
type Output = BitSet
The resulting type after applying the >>
operator.
fn shr(self, x: usize) -> Self::Output
[src]
impl<'a> BitAndAssign<&'a BitSet> for BitSet
[src]
fn bitand_assign(&mut self, rhs: &'a Self)
[src]
impl<'a> BitOrAssign<&'a BitSet> for BitSet
[src]
fn bitor_assign(&mut self, rhs: &'a Self)
[src]
impl<'a> BitXorAssign<&'a BitSet> for BitSet
[src]
fn bitxor_assign(&mut self, rhs: &'a Self)
[src]
impl ShlAssign<usize> for BitSet
[src]
fn shl_assign(&mut self, x: usize)
[src]
impl ShrAssign<usize> for BitSet
[src]
fn shr_assign(&mut self, x: usize)
[src]
impl Index<usize> for BitSet
[src]
impl Debug for BitSet
[src]
Auto Trait Implementations
impl Send for BitSet
impl Unpin for BitSet
impl Sync for BitSet
impl UnwindSafe for BitSet
impl RefUnwindSafe for BitSet
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,