[][src]Struct bitset_fixed::BitSet

pub struct BitSet { /* fields omitted */ }

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]

impl PartialEq<BitSet> for BitSet[src]

impl Ord for BitSet[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Eq for BitSet[src]

impl Clone for 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_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

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.

impl<'a> Not for &'a BitSet[src]

type Output = BitSet

The resulting type after applying the ! operator.

impl<'a> BitAnd<&'a BitSet> for BitSet[src]

type Output = Self

The resulting type after applying the & operator.

impl<'a, 'b> BitAnd<&'b BitSet> for &'a BitSet[src]

type Output = BitSet

The resulting type after applying the & operator.

impl<'a> BitOr<&'a BitSet> for BitSet[src]

type Output = Self

The resulting type after applying the | operator.

impl<'a, 'b> BitOr<&'b BitSet> for &'a BitSet[src]

type Output = BitSet

The resulting type after applying the | operator.

impl<'a> BitXor<&'a BitSet> for BitSet[src]

type Output = Self

The resulting type after applying the ^ operator.

impl<'a, 'b> BitXor<&'b BitSet> for &'a BitSet[src]

type Output = BitSet

The resulting type after applying the ^ operator.

impl Shl<usize> for BitSet[src]

type Output = Self

The resulting type after applying the << operator.

impl<'a> Shl<usize> for &'a BitSet[src]

type Output = BitSet

The resulting type after applying the << operator.

impl Shr<usize> for BitSet[src]

type Output = Self

The resulting type after applying the >> operator.

impl<'a> Shr<usize> for &'a BitSet[src]

type Output = BitSet

The resulting type after applying the >> operator.

impl<'a> BitAndAssign<&'a BitSet> for BitSet[src]

impl<'a> BitOrAssign<&'a BitSet> for BitSet[src]

impl<'a> BitXorAssign<&'a BitSet> for BitSet[src]

impl ShlAssign<usize> for BitSet[src]

impl ShrAssign<usize> for BitSet[src]

impl Index<usize> for BitSet[src]

type Output = bool

The returned type after indexing.

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]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]