Skip to content

Commit 73198fc

Browse files
pbouffardararslan
authored andcommitted
Documentation for permutations(a) (#67)
* Add permutations(a) to list of functions * permutations(a) docstring Mention lexicographic order in permutations(a) docstring * Tickmarks
1 parent 65ec577 commit 73198fc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ This library provides the following functions:
3030
- `stirlings1(n, k, signed=false)`: returns the `(n,k)`-th Stirling number of the first kind; the number is signed if `signed` is true; returns a `BigInt` only if given a `BigInt`.
3131
- `stirlings2(n, k)`: returns the `(n,k)`-th Stirling number of the second kind; returns a `BigInt` only if given a `BigInt`.
3232
- `nthperm(a, k)`: Compute the `k`th lexicographic permutation of the vector `a`.
33+
- `permutations(a)`: Generate all permutations of an indexable object `a` in lexicographic order.
3334

3435
Young diagrams
3536
--------------

src/permutations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Base.length(p::Permutations) = (0 <= p.t <= length(p.a)) ? factorial(length(p.a)
2121
"""
2222
permutations(a)
2323
24-
Generate all permutations of an indexable object `a`. Because the number of permutations
24+
Generate all permutations of an indexable object `a` in lexicographic order. Because the number of permutations
2525
can be very large, this function returns an iterator object.
2626
Use `collect(permutations(a))` to get an array of all permutations.
2727
"""

0 commit comments

Comments
 (0)