| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
HaskellWorks.Data.RankSelect.Base.Select1
Documentation
class Select1 v where Source #
Methods
Find length of the shortest prefix of the given prefix that contains specified number of occurences of the bit 1
If the bitstring does not have enough occurences of bit 1 is insufficient to satisfy the query the result is undefined.
>>>import HaskellWorks.Data.Bits.BitRead>>>:set -XTypeApplications
>>>select1 (unsafeBitRead @Word8 "00000000") 00>>>select1 (unsafeBitRead @Word8 "00001000") 15>>>select1 (unsafeBitRead @Word8 "11111111") 44>>>select1 (unsafeBitRead @Word8 "00111111") 46>>>select1 (unsafeBitRead @Word8 "10011111") 46
Instances
| Select1 Bool Source # | |
| Select1 Word8 Source # | |
| Select1 Word16 Source # | |
| Select1 Word32 Source # | |
| Select1 Word64 Source # | |
| (PopCount1 w, Select1 w, BitSize w) => Select1 [w] Source # | |
| Select1 (Vector Bit) Source # | |
| Select1 (Vector Bit) Source # | |
| Select1 a => Select1 (BitShown a) Source # | |
| Select1 (Vector Word8) Source # | |
| Select1 (Vector Word16) Source # | |
| Select1 (Vector Word32) Source # | |
| Select1 (Vector Word64) Source # | |
| Select1 (Vector Word8) Source # | |
| Select1 (Vector Word16) Source # | |
| Select1 (Vector Word32) Source # | |
| Select1 (Vector Word64) Source # | |