Safe Haskell | None |
---|---|
Language | Haskell2010 |
Signed integer version of dynamic word vectors.
See Data.Vector.Compact.WordVec for more details.
Synopsis
- newtype IntVec = IntVec WordVec
- vecShape :: IntVec -> Shape
- vecLen :: IntVec -> Int
- vecBits :: IntVec -> Int
- showIntVec :: IntVec -> String
- showsPrecIntVec :: Int -> IntVec -> ShowS
- empty :: IntVec
- null :: IntVec -> Bool
- toList :: IntVec -> [Int]
- fromList :: [Int] -> IntVec
- fromList' :: (Int, (Int, Int)) -> [Int] -> IntVec
- lenMinMax :: [Int] -> (Int, (Int, Int))
- int2word :: Int -> Int -> Word
- word2int :: Int -> Word -> Int
- unsafeIndex :: Int -> IntVec -> Int
- safeIndex :: Int -> IntVec -> Maybe Int
- head :: IntVec -> Int
- bitsNeededForMinMax :: (Int, Int) -> Int
- bitsNeededFor :: Int -> Int
- roundBits :: Int -> Int
The dynamic Int vector type
A dynamic int vector is a (small) vector of small signed integers stored compactly
showIntVec :: IntVec -> String Source #
Empty
Conversion from/to lists
Indexing
helpers for counting the necessary number of bits
bitsNeededFor :: Int -> Int Source #