battleship-combinatorics-0.0.0.2: Compute number of possible arrangements in the battleship game

Safe HaskellSafe
LanguageHaskell98

Combinatorics.Battleship.Count.Counter

Documentation

class C a Source #

Minimal complete definition

zero, one, add

Instances
C Word8 Source # 
Instance details

Defined in Combinatorics.Battleship.Count.Counter

C Word32 Source # 
Instance details

Defined in Combinatorics.Battleship.Count.Counter

C Word64 Source # 
Instance details

Defined in Combinatorics.Battleship.Count.Counter

(C hi, C lo, Ord lo) => C (Composed hi lo) Source # 
Instance details

Defined in Combinatorics.Battleship.Count.Counter

Methods

zero :: Composed hi lo Source #

one :: Composed hi lo Source #

add :: Composed hi lo -> Composed hi lo -> Composed hi lo Source #

(Nat w, Nat h, C a, Storable a) => C (Distr w h a) Source # 
Instance details

Defined in Combinatorics.Battleship.Count.ShortenShip.Distribution

Methods

zero :: Distr w h a Source #

one :: Distr w h a Source #

add :: Distr w h a -> Distr w h a -> Distr w h a Source #

data Composed hi lo Source #

Instances
(Eq hi, Eq lo) => Eq (Composed hi lo) Source # 
Instance details

Defined in Combinatorics.Battleship.Count.Counter

Methods

(==) :: Composed hi lo -> Composed hi lo -> Bool #

(/=) :: Composed hi lo -> Composed hi lo -> Bool #

(Ord hi, Ord lo) => Ord (Composed hi lo) Source # 
Instance details

Defined in Combinatorics.Battleship.Count.Counter

Methods

compare :: Composed hi lo -> Composed hi lo -> Ordering #

(<) :: Composed hi lo -> Composed hi lo -> Bool #

(<=) :: Composed hi lo -> Composed hi lo -> Bool #

(>) :: Composed hi lo -> Composed hi lo -> Bool #

(>=) :: Composed hi lo -> Composed hi lo -> Bool #

max :: Composed hi lo -> Composed hi lo -> Composed hi lo #

min :: Composed hi lo -> Composed hi lo -> Composed hi lo #

(Integ hi, Integ lo) => Show (Composed hi lo) Source # 
Instance details

Defined in Combinatorics.Battleship.Count.Counter

Methods

showsPrec :: Int -> Composed hi lo -> ShowS #

show :: Composed hi lo -> String #

showList :: [Composed hi lo] -> ShowS #

(Arbitrary a, Arbitrary b) => Arbitrary (Composed a b) Source # 
Instance details

Defined in Combinatorics.Battleship.Count.Counter

Methods

arbitrary :: Gen (Composed a b) #

shrink :: Composed a b -> [Composed a b] #

(Storable a, Storable b) => Storable (Composed a b) Source #

This instance expects that there is no need for padding for alignment

Instance details

Defined in Combinatorics.Battleship.Count.Counter

Methods

sizeOf :: Composed a b -> Int #

alignment :: Composed a b -> Int #

peekElemOff :: Ptr (Composed a b) -> Int -> IO (Composed a b) #

pokeElemOff :: Ptr (Composed a b) -> Int -> Composed a b -> IO () #

peekByteOff :: Ptr b0 -> Int -> IO (Composed a b) #

pokeByteOff :: Ptr b0 -> Int -> Composed a b -> IO () #

peek :: Ptr (Composed a b) -> IO (Composed a b) #

poke :: Ptr (Composed a b) -> Composed a b -> IO () #

(C hi, C lo, Ord lo) => C (Composed hi lo) Source # 
Instance details

Defined in Combinatorics.Battleship.Count.Counter

Methods

zero :: Composed hi lo Source #

one :: Composed hi lo Source #

add :: Composed hi lo -> Composed hi lo -> Composed hi lo Source #

zero, one :: C a => a Source #

zero, one :: C a => a Source #

add :: C a => a -> a -> a Source #

sum :: C a => [a] -> a Source #

toInteger :: Integ a => a -> Integer Source #