Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-09 21:44:11

Off the cuff: you could think about generating fragments of the result
vector by indexing from the bitset a byte-at-a-time via a lookup table of
256 arrays of size() <= 8 (including length indicator). This is also the
data structure you could use to quickly determine how much memory to
allocate for the result.

----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, March 09, 2001 8:21 PM
Subject: RE: [boost] bitset/vector<bool> lacking

> Actually, it's the fast "set" operations that are more important to me...
> so I may start with the SGI STL version of std::bitvec and just make it
> dynamic sized, and then snatch the iterators from std::vector<bool>...
> actually I'm not sure I even really want to iterate over bool's. What I
> really want is to convert the bit set into the equivalent compressed
> format: a vector of integers, where the integers correspond to positions
> in the bit set that are "1". I wonder what the fastest way to do this
> conversion is?
> Cheers,
> Jeremy

Boost list run by bdawes at, gregod at, cpdaniel at, john at