Struct collections::bitv::BitvSet[src]

pub struct BitvSet {
    // some fields omitted
}

An implementation of a set using a bit vector as an underlying representation for holding numerical elements.

It should also be noted that the amount of storage necessary for holding a set of objects is proportional to the maximum of the objects when viewed as a uint.

Methods

impl BitvSet

fn new() -> BitvSet

Creates a new bit vector set with initially no contents

fn from_bitv(bitv: Bitv) -> BitvSet

Creates a new bit vector set from the given bit vector

fn capacity(&self) -> uint

Returns the capacity in bits for this bit vector. Inserting any element less than this amount will not trigger a resizing.

fn unwrap(self) -> Bitv

Consumes this set to return the underlying bit vector

fn union_with(&mut self, other: &BitvSet)

Union in-place with the specified other bit vector

fn intersect_with(&mut self, other: &BitvSet)

Intersect in-place with the specified other bit vector

fn difference_with(&mut self, other: &BitvSet)

Difference in-place with the specified other bit vector

fn symmetric_difference_with(&mut self, other: &BitvSet)

Symmetric difference in-place with the specified other bit vector

fn iter<'a>(&'a self) -> BitPositions<'a>

fn difference(&self, other: &BitvSet, f: |&uint| -> bool) -> bool

fn symmetric_difference(&self, other: &BitvSet, f: |&uint| -> bool) -> bool

fn intersection(&self, other: &BitvSet, f: |&uint| -> bool) -> bool

fn union(&self, other: &BitvSet, f: |&uint| -> bool) -> bool

Trait Implementations

impl Default for BitvSet

fn default() -> BitvSet

impl PartialEq for BitvSet

fn eq(&self, other: &BitvSet) -> bool

fn ne(&self, other: &BitvSet) -> bool

impl Eq for BitvSet

impl Show for BitvSet

fn fmt(&self, fmt: &mut Formatter) -> Result

impl<S: Writer> Hash<S> for BitvSet

fn hash(&self, state: &mut S)

impl Collection for BitvSet

fn len(&self) -> uint

fn is_empty(&self) -> bool

impl Mutable for BitvSet

fn clear(&mut self)

impl Set<uint> for BitvSet

fn contains(&self, value: &uint) -> bool

fn is_disjoint(&self, other: &BitvSet) -> bool

fn is_subset(&self, other: &BitvSet) -> bool

fn is_superset(&self, other: &BitvSet) -> bool

impl MutableSet<uint> for BitvSet

fn insert(&mut self, value: uint) -> bool

fn remove(&mut self, value: &uint) -> bool

Derived Implementations

impl Clone for BitvSet

fn clone(&self) -> BitvSet

fn clone_from(&mut self, source: &Self)