Boost logo

Boost Users :

Subject: Re: [Boost-users] dynamic_bitset: request for new functions
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-11-11 17:49:17


Le 11/11/11 22:01, David Hochstuhl a écrit :
> Hey,
>
> thank you for your answer.
>
>> For the find features, I would consider to provide a view of a bitset
>> that behaves as standard set, with iterators. Even if the complexity of
>> these operations could not conform to the standard one, the advantages
>> are evident. In the same way you can associate a view of the
>> complementary set.
> I don't understand exactly what mean by this. Do you mean one should set up
> a std::set or something similar from a range of the bitset?
>
Hi and sorry for my inexact response.

No, the idea was to define a view of a dynamic_bitset that behaves as a
set (ordered collection). But given the current interface this has no
sense, as there is no interface to the underlying storage (see below).
>> For the bit-twiddling hacks algorithm, the interface is almost ready.
>> Currently there is the data() function given access to the storage, and
>> a constructor from it. The problem is that the access is read-only and
>> the constructor will make a copy. Adding some move functions to extract
>> the storage and to take an external storage would permit to build every
>> algorithm you want on top of them in an efficient way.
> Can you tell me where to find this function. I searched the documentation and the
> source code, but couldn't find it.
I don't know why I though that dynamic_bitset provided a such a data
function.
Given the current interface I find your requests quite reasonable.
>
>> As you said this is a lot and even if this is not complex, this will
>> need a considerable time to make something with the expected quality. Do
>> you think that you could contribute in some way?
> Sure I could, but I don't know whether I could provide the "expected quality".
> I anyway planned to code at least the LSB/MSB search functions for myself.
>
I'm sure that if you provide a patch for the functions you are
suggesting, with documentation and test, the author/maintainer will
accept them.

My apologies if my tone was not friendly, this was not my intention.

Best,
Vicente


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net