Boost logo

Boost :

Subject: Re: [boost] [Feedback] Towards a Better Boost.BloomFilter
From: Alejandro Cabrera (cpp.cabrera_at_[hidden])
Date: 2011-08-30 15:24:30


Phil,

Phil Endecott-48 wrote:
>
> It is normally preferable to pass a begin-end pair rather than address
> and length, but fundamentally yes I would like to be able to construct
> a read-only bloom filter from a pair of const_iterators i.e. const
> pointers in this case.
>

The input iterator constructor is already available. All that remains is
what you describe below.

Phil Endecott-48 wrote:
>
> I don't care about serialisation. I just want to be able to
>
> const T* p = &(*(bloom_filter.data().begin()));
> size_t len = sizeof(T) * bloom_filter.data().size();
> write(fd,p,len);
>
> Regards, Phil.
>

All this should take is changing the underlying storage type to something
that supports the operations begin() and size(). The intent is to use
std::vector, as with the dynamic counting Bloom filter implementations. The
operations you've described above are serialization. This will be supported
soon, as soon as I can work on the basic Bloom filters. I'll add a test to
my suite to make sure there is a way to support this in both directions
(write/read, store/load).

Thanks,
-Alej

--
View this message in context: http://boost.2283326.n4.nabble.com/Feedback-Towards-a-Better-Boost-BloomFilter-tp3766988p3779549.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk