|
Boost : |
Subject: Re: [boost] [interval container (itl)] A pretty large bitset
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2009-11-03 08:21:54
2009/11/3 Joachim Faulhaber <afojgo_at_[hidden]>:
> 2009/11/3 Scott McMurray <me22.ca+boost_at_[hidden]>:
>> 2009/11/2 Joachim Faulhaber <afojgo_at_[hidden]>:
>>>
>
>> How does it handle a repeat of 128 1s then 128 0s then 128 1s etc?
>> (Or any repeating signal with a period longer than one storage unit?)
>
> So a large_bitset<uint64_t, mini::bits<uint64_t> > would handle
> them this way:
>
> [0,2)->"111...1" (all 64 bits set)
> [2,4)->"111...1"
> ...
> [k,k+2)->"111...1"
>
> which is obviously much less compact than the initial example
> but still a good compression.
>
Correction:
[0,2)->"111...1" (all 128 bits set from bit 0 to bit 127)
(none of 128 bits set from bit 128 to bit 255)
[4,6)->"111...1" (all 128 bits set from bit 256 to bit 383) and so on
...
[4*k, 4*k+2)->"111...1"
-- Joachim
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk