Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Skew partitions.
Skew partitions are the difference of two integer partitions, denoted by lambda/mu
.
For example
mkSkewPartition (Partition [9,7,3,2,2,1] , Partition [5,3,2,1])
creates the skew partition (9,7,3,2,2,1) / (5,3,2,1)
, which looks like
Synopsis
- newtype SkewPartition = SkewPartition [(Int, Int)]
- mkSkewPartition :: (Partition, Partition) -> SkewPartition
- safeSkewPartition :: (Partition, Partition) -> Maybe SkewPartition
- skewPartitionWeight :: SkewPartition -> Int
- normalizeSkewPartition :: SkewPartition -> SkewPartition
- fromSkewPartition :: SkewPartition -> (Partition, Partition)
- outerPartition :: SkewPartition -> Partition
- innerPartition :: SkewPartition -> Partition
- dualSkewPartition :: SkewPartition -> SkewPartition
- skewPartitionElements :: SkewPartition -> [(Int, Int)]
- skewPartitionsWithOuterShape :: Partition -> Int -> [SkewPartition]
- allSkewPartitionsWithOuterShape :: Partition -> [SkewPartition]
- skewPartitionsWithInnerShape :: Partition -> Int -> [SkewPartition]
- asciiSkewFerrersDiagram :: SkewPartition -> ASCII
- asciiSkewFerrersDiagram' :: (Char, Char) -> PartitionConvention -> SkewPartition -> ASCII
Basics
newtype SkewPartition Source #
A skew partition lambda/mu
is internally represented by the list [ (mu_i , lambda_i-mu_i) | i<-[1..n] ]
SkewPartition [(Int, Int)] |
Instances
mkSkewPartition :: (Partition, Partition) -> SkewPartition Source #
mkSkewPartition (lambda,mu)
creates the skew partition lambda/mu
.
Throws an error if mu
is not a sub-partition of lambda
.
safeSkewPartition :: (Partition, Partition) -> Maybe SkewPartition Source #
Returns Nothing
if mu
is not a sub-partition of lambda
.
skewPartitionWeight :: SkewPartition -> Int Source #
The weight of a skew partition is the weight of the outer partition minus the the weight of the inner partition (that is, the number of boxes present).
normalizeSkewPartition :: SkewPartition -> SkewPartition Source #
This function "cuts off" the "uninteresting parts" of a skew partition
fromSkewPartition :: SkewPartition -> (Partition, Partition) Source #
Returns the outer and inner partition of a skew partition, respectively:
mkSkewPartition . fromSkewPartition == id
outerPartition :: SkewPartition -> Partition Source #
The lambda
part of lambda/mu
innerPartition :: SkewPartition -> Partition Source #
The mu
part of lambda/mu
dualSkewPartition :: SkewPartition -> SkewPartition Source #
The dual skew partition (that is, the mirror image to the main diagonal)
skewPartitionElements :: SkewPartition -> [(Int, Int)] Source #
See "partitionElements"
Listing skew partitions
skewPartitionsWithOuterShape :: Partition -> Int -> [SkewPartition] Source #
Lists all skew partitions with the given outer shape and given (skew) weight
allSkewPartitionsWithOuterShape :: Partition -> [SkewPartition] Source #
Lists all skew partitions with the given outer shape and any (skew) weight
skewPartitionsWithInnerShape :: Partition -> Int -> [SkewPartition] Source #
Lists all skew partitions with the given inner shape and given (skew) weight
ASCII
asciiSkewFerrersDiagram' :: (Char, Char) -> PartitionConvention -> SkewPartition -> ASCII Source #