|
|
|
|
|
| Description |
| Immutable one-dimensional packed bit arrays.
The main advantage should be compactness in memory.
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data BitArray |
| A packed bit array.
Internally, it is represented as an unboxed array of Word64-s.
| Instances | |
|
|
| bitArrayBounds :: BitArray -> (Int, Int) |
|
| lookupBit :: BitArray -> Int -> Bool |
|
| unsafeLookupBit :: BitArray -> Int -> Bool |
|
| Bit array construction / deconstruction
|
|
| bitArray :: (Int, Int) -> [(Int, Bool)] -> BitArray |
| Unspecified values become False.
|
|
| bitArray' :: Bool -> (Int, Int) -> [(Int, Bool)] -> BitArray |
| The first argument gives the default value (instead of False)
|
|
| accumBitArray :: (Bool -> a -> Bool) -> Bool -> (Int, Int) -> [(Int, a)] -> BitArray |
|
| listBitArray :: (Int, Int) -> [Bool] -> BitArray |
| If the list is too short, the rest of the array is filled with False.
|
|
| bits :: BitArray -> [Bool] |
|
| 0/1 versions
|
|
| bits01 :: BitArray -> [Int] |
|
| listBitArray01 :: (Int, Int) -> [Int] -> BitArray |
|
| Produced by Haddock version 2.4.1 |