| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
HaskellWorks.Data.RankSelect.Base.Rank1
Documentation
Methods
Find the number of occurences of the bit 1 in the prefix of the supplied bitstring of the given length
>>>import HaskellWorks.Data.Bits.BitRead>>>:set -XTypeApplications
>>>rank1 (unsafeBitRead @Word8 "00000000") 40>>>rank1 (unsafeBitRead @Word8 "11000000") 42>>>rank1 (unsafeBitRead @Word8 "01100000") 42>>>rank1 (unsafeBitRead @Word8 "01100110") 42>>>rank1 (unsafeBitRead @Word8 "01100110") 63
Instances
| Rank1 Bool Source # | |
| Rank1 Word8 Source # | |
| Rank1 Word16 Source # | |
| Rank1 Word32 Source # | |
| Rank1 Word64 Source # | |
| (PopCount1 w, Rank1 w, BitSize w) => Rank1 [w] Source # | |
| Rank1 (Vector Bit) Source # | |
| Rank1 (Vector Bit) Source # | |
| Rank1 a => Rank1 (BitShown a) Source # | |
| Rank1 (Vector Word8) Source # | |
| Rank1 (Vector Word16) Source # | |
| Rank1 (Vector Word32) Source # | |
| Rank1 (Vector Word64) Source # | |
| Rank1 (Vector Word8) Source # | |
| Rank1 (Vector Word16) Source # | |
| Rank1 (Vector Word32) Source # | |
| Rank1 (Vector Word64) Source # | |