Documentation ¶
Overview ¶
Package permute implements a generic method for in-place generation of all permutations for ordered collections.
Example (Ints) ¶
s := []int{5, 7} p := permute.Slice(s) for p.Permute() { fmt.Println(s) }
Output: [5 7] [7 5]
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // Len is the number of elements in the collection. Len() int // Swap swaps the elements with indexes i and j. Swap(i, j int) }
Interface is satisfied by types (usually ordered collections) which can have all permutations generated by a Permuter.
Click to show internal directories.
Click to hide internal directories.