P258: Enumeration of all integer partitions in (anti-)lexicographical order

P258: Enumeration of all integer partitions in (anti-)lexicographical order
Input:
An integer $n$.
Output:
All integer partitions of $n$.
Complexity:
$O(1)$ time per solution on average.
Comment:
Reference:
[Stojmenovic2007] (Bibtex)