Re: Are there any databases that can store multidiimensional boolean arrays?



On 2006-07-04, Oliver Wong <owong@xxxxxxxxxxxxxx> wrote:
"Rhino" <no.offline.contact.please@xxxxxxxxxx> wrote in message
news:e8e2ub$pfd$1@xxxxxxxxxxxxxxxx

I'd never noticed the BitSet class before in several years of coding Java
but I just took a look at it in the API. Is there any particular reason
why it is better than just turning a boolean array into a String of T's
and F's. I assume it uses less space since bits are smaller than Strings
but wouldn't it get a bit cumbersome to have to have a Bitset within a
Bitset within a Bitset within a Bitset just to represent this array?

It will probably use significantly less space. 200'000 * 53'000 bits =
10600000000 bits, or around 1.2 GBs.

If you represent each bit with a single 16 bit character, you're
multiplying the size requirements by 16, i.e. around 19.7GBs.

- Oliver

You may also want to consider what this array represents in the design.
Is is a sparse array? Could it be better represented in another way?

Lordy
.



Relevant Pages

  • Re: Pascal-like set class
    ... > membership seem odd, because I pronounce the code "If element e is equal ... the reason I wrote it was because I wanted low-level control of the ... answer to your question is they wouldn't, except when the array is only one ... bitset, then the answer is pascal_set is more typesafe then bitset and I ...
    (comp.lang.cpp)
  • Re: Are there any databases that can store multidiimensional boolean arrays?
    ... the simplest solution is probably to serialize these arrays into a BLOB column. ... I'd never noticed the BitSet class before in several years of coding Java but I just took a look at it in the API. ... Is there any particular reason why it is better than just turning a boolean array into a String of T's and F's. ... I assume it uses less space since bits are smaller than Strings but wouldn't it get a bit cumbersome to have to have a Bitset within a Bitset within a Bitset within a Bitset just to represent this array? ...
    (comp.lang.java.databases)
  • Re: Are there any databases that can store multidiimensional boolean arrays?
    ... This person wants to store a four dimensional boolean array, ... I'd never noticed the BitSet class before in several years of coding Java ...
    (comp.lang.java.databases)
  • Re: algorithm help
    ... i added a larger range 1000..5000 to the test set which should come ... closer to ara's problem at hand. ... Interestingly this brings the bitset approach back in play, ... Your approach has a clear advantage if ranges are fairly large compared to the overall number of elements in the array. ...
    (comp.lang.ruby)
  • Using <bitset>
    ... Is there a way to use <bitset> on an external array of bits (rather than ... bitset's built in _Array)? ...
    (microsoft.public.vc.stl)