Struct extra::bitv::BitvSet

pub struct BitvSet {
    priv size: uint,
    priv bitv: BigBitv,
}

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) -> BitvSetIterator<'a>

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

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

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

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

Trait Implementations

impl std::clone::Clone for BitvSet

fn clone(&self) -> BitvSet

impl std::cmp::Eq for BitvSet

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

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

impl std::container::Container for BitvSet

fn len(&self) -> uint

impl std::container::Mutable for BitvSet

fn clear(&mut self)

impl std::container::Set 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 std::container::MutableSet for BitvSet

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

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