tomasz.zielonka:
On Fri, Sep 15, 2006 at 11:35:45AM +1000, Thomas Conway wrote:
My question for all present is: Have I missed either a problem with
using Integer, or have I overlooked a better representation?
Consider also (UArray Int Bool). In GHC it has an efficient
implementation.
A
On Fri, 15 Sep 2006, Thomas Conway wrote:
My question for all present is: Have I missed either a problem with
using Integer, or have I overlooked a better representation?
With my Modula background, where a machine-oriented SET type is available,
I consider using integers as bit sets (as in
Hi all,
I'm doing some work with ASN.1, and I'm thinking about how to
represent the type BIT STRING.
The obvious, and inefficient representation would be
type BitString = [Bool]
A reasonable sparse representation might be
type BitString = [Integer]
where the integers represent the
It's hard to tell what the best representation is if you don't know
what the operations that you are going to perform are. If all you
are going to do is I/O of bitstrings, then [Bool] could be great. If
you need to do bitwise boolean ops then Integer is a wise choice.
-- Lennart
On 9/15/06, Lennart Augustsson [EMAIL PROTECTED] wrote:
It's hard to tell what the best representation is if you don't know
what the operations that you are going to perform are. If all you
are going to do is I/O of bitstrings, then [Bool] could be great. If
you need to do bitwise boolean ops
On Fri, Sep 15, 2006 at 11:35:45AM +1000, Thomas Conway wrote:
My question for all present is: Have I missed either a problem with
using Integer, or have I overlooked a better representation?
Consider also (UArray Int Bool). In GHC it has an efficient
implementation.
Best regards
Tomasz