vendor: Mega update all dependencies
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4080
This commit is contained in:
8
vendor/github.com/cznic/mathutil/permute.go
generated
vendored
8
vendor/github.com/cznic/mathutil/permute.go
generated
vendored
@@ -8,14 +8,14 @@ import (
|
||||
"sort"
|
||||
)
|
||||
|
||||
// Generate the first permutation of data.
|
||||
// PermutationFirst generates the first permutation of data.
|
||||
func PermutationFirst(data sort.Interface) {
|
||||
sort.Sort(data)
|
||||
}
|
||||
|
||||
// Generate the next permutation of data if possible and return true.
|
||||
// Return false if there is no more permutation left.
|
||||
// Based on the algorithm described here:
|
||||
// PermutationNext generates the next permutation of data if possible and
|
||||
// return true. Return false if there is no more permutation left. Based on
|
||||
// the algorithm described here:
|
||||
// http://en.wikipedia.org/wiki/Permutation#Generation_in_lexicographic_order
|
||||
func PermutationNext(data sort.Interface) bool {
|
||||
var k, l int
|
||||
|
||||
Reference in New Issue
Block a user