combinat-0.2.8.1: Generate and manipulate various combinatorial objects.

Safe HaskellNone
LanguageHaskell2010

Math.Combinat.Partitions.Plane

Contents

Description

Plane partitions. See eg. http://en.wikipedia.org/wiki/Plane_partition

Plane partitions are encoded as lists of lists of Z heights. For example the plane partition in the picture

is encoded as

PlanePart [ [5,4,3,3,1]
          , [4,4,2,1]
          , [3,2]
          , [2,1]
          , [1]
          , [1]
          ]

Synopsis

the type of plane partitions

newtype PlanePart Source

A plane partition encoded as a tablaeu (the "Z" heights are the numbers)

Constructors

PlanePart [[Int]] 

toPlanePart :: [[Int]] -> PlanePart Source

Throws an exception if the input is not a plane partition

planePartShape :: PlanePart -> Partition Source

The XY projected shape of a plane partition, as an integer partition

planePartZHeight :: PlanePart -> Int Source

The Z height of a plane partition

constructing plane partitions

stackLayers :: [Partition] -> PlanePart Source

Stacks layers of partitions into a plane partition. Throws an exception if they do not form a plane partition.

unsafeStackLayers :: [Partition] -> PlanePart Source

Stacks layers of partitions into a plane partition. This is unsafe in the sense that we don't check that the partitions fit on the top of each other.

planePartLayers :: PlanePart -> [Partition] Source

The "layers" of a plane partition (in direction Z). We should have

unsafeStackLayers (planePartLayers pp) == pp

generating plane partitions

planePartitions :: Int -> [PlanePart] Source

Plane partitions of a given weight