Routines to enumerate all partitions of an integer; includes restricted and unequal partitions.
This package comprises eight functions:
S() give the number of partitions, unequal
partitions, restricted partitions, and block partitions of an integer.
blockparts() enumerate these partitions.
conjugate() gives the conjugate of a partition and
durfee() gives the size of the Durfee square.
NB the emphasis in this package is terse, efficient C code.
This means that there is a minimum of argument checking. For example,
conjugate() assumes that the partition is in standard
form (ie nonincreasing); supplying a vector in nonstandard form will
result in garbage being returned silently. Note that a block partition
is not necessarily in standard form.
Robin K. S. Hankin
G. E. Andrews 1998 The Theory of Partitions, Cambridge University Press
M. Abramowitz and I. A. Stegun 1965. Handbook of Mathematical Functions, New York: Dover
G. H. Hardy and E. M. Wright 1985 An introduction to the theory of numbers, Clarendon Press: Oxford (fifth edition)
R. K. S. Hankin 2006. “Additive integer partitions in R”. Journal of Statistical Software, Volume 16, code snippet 1
R. K. S. Hankin 2007. “Urn sampling without replacement: enumerative combinatorics in R”. Journal of Statistical Software, Volume 17, code snippet 1
R. K. S. Hankin 2007. “Set partitions in R”. Journal of Statistical Software, Volume 23, code snippet 2
1 2 3 4 5 6
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.