Safe Haskell | None |
---|---|
Language | Haskell2010 |
Check a number of properties for popcount-ordered elements.
$setup
>>>
:set -XScopedTypeVariables
- prop_PopCountSet :: NonZero Int16 -> Bool
- memoSorted :: Int -> [[Int]]
- enumSorted :: Int -> [[Int]]
- prop_lsb_Int :: Int -> Bool
- prop_lsb_Word :: Word -> Bool
- prop_OneBits_Int :: Int -> Bool
- prop_allPermutations :: (Int, Int) -> Bool
- prop_popShiftL_popShiftR :: (Word, Word) -> Bool
Documentation
prop_PopCountSet :: NonZero Int16 -> Bool Source
Check if both the memoized version and the population enumeration produce the same multisets, but maybe in different order.
\(n :: Int16) -> let b = popCount n in memoSorted b == enumSorted b
memoSorted :: Int -> [[Int]] Source
enumSorted :: Int -> [[Int]] Source
prop_lsb_Int :: Int -> Bool Source
prop_lsb_Word :: Word -> Bool Source
prop_OneBits_Int :: Int -> Bool Source
prop_allPermutations :: (Int, Int) -> Bool Source
prop_popShiftL_popShiftR :: (Word, Word) -> Bool Source