Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Type classes for some common properties shared by different objects
- class CanBeEmpty a where
- class HasNumberOfParts a where
- numberOfParts :: a -> Int
- class HasWidth a where
- class HasHeight a where
- class HasWeight a where
- class HasDuality a where
- dual :: a -> a
- class HasShape a s | a -> s where
- shape :: a -> s
- class HasNumberOfNodes t where
- numberOfNodes :: t -> Int
- class HasNumberOfLeaves t where
- numberOfLeaves :: t -> Int
- class HasNumberOfCycles p where
- numberOfCycles :: p -> Int
Documentation
class CanBeEmpty a where Source
Emptyness
Partitions
class HasDuality a where Source
Duality (of partitions, tableaux, etc)
Tableau
Trees
class HasNumberOfNodes t where Source
Number of nodes (of trees)
numberOfNodes :: t -> Int Source
HasNumberOfNodes (BinTree a) Source | |
HasNumberOfNodes (BinTree' a b) Source |
class HasNumberOfLeaves t where Source
Number of leaves (of trees)
numberOfLeaves :: t -> Int Source
HasNumberOfLeaves (BinTree a) Source | |
HasNumberOfLeaves (Tree a) Source | |
HasNumberOfLeaves (BinTree' a b) Source |
Permutations
class HasNumberOfCycles p where Source
Number of cycles (of partitions)
numberOfCycles :: p -> Int Source