bitarray-0.0.1: Mutable and immutable bit arraysContentsIndex
Data.BitArray
Contents
Bit array construction / deconstruction
0/1 versions
Description
Immutable one-dimensional packed bit arrays. The main advantage should be compactness in memory.
Synopsis
data BitArray
bitArrayBounds :: BitArray -> (Int, Int)
lookupBit :: BitArray -> Int -> Bool
unsafeLookupBit :: BitArray -> Int -> Bool
bitArray :: (Int, Int) -> [(Int, Bool)] -> BitArray
bitArray' :: Bool -> (Int, Int) -> [(Int, Bool)] -> BitArray
accumBitArray :: (Bool -> a -> Bool) -> Bool -> (Int, Int) -> [(Int, a)] -> BitArray
listBitArray :: (Int, Int) -> [Bool] -> BitArray
bits :: BitArray -> [Bool]
bits01 :: BitArray -> [Int]
listBitArray01 :: (Int, Int) -> [Int] -> BitArray
Documentation
data BitArray
A packed bit array. Internally, it is represented as an unboxed array of Word64-s.
show/hide 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