Skip to content

SortedPartition ​

The partition a composition's parts form, sorted largest first.

SortedPartition(IntegerComposition)The partition a composition's parts form, sorted largest first.
Typed signatures
TypePackageApplies
(composition) -> integer_partitioncombinatoricsalways

Domain: Combinatorial maps

Details
  • Takes a IntegerComposition and returns a IntegerPartition — a typed map, so a wrong carrier is a type error rather than a wrong answer.
  • Lossy: the order of the parts is forgotten, so it is not a constructor overload.

Examples

Basic #

the composition 2+1+32 + 1 + 3

live ↗
InSortedPartition(IntegerComposition⁡([2,1,3]))\mathrm{SortedPartition}({\operatorname{IntegerComposition}}([2, 1, 3]))OutIntegerPartition⁡([3,2,1]){\operatorname{IntegerPartition}}([3, 2, 1])
About
Examples1
CrosswalkFindStat