permutation:排列

时间:2021-05-20 07:22:39
【文件属性】:
文件名称:permutation:排列
文件大小:434KB
文件格式:ZIP
更新时间:2021-05-20 07:22:39
Go 排列 Golang的排列库。 使用NewPerm()生成Pemutator ,参数k必须为非nil slice ,参数less必须为实现k的元素类型的比较功能的Less函数。 如果k的元素是有序的,说法不太可能nil.For在Golang订购,请访问 func NewPerm ( k interface {}, less Less ) ( * Permutator , error ) 生成置换器后,可以修改和删除参数k,置换器存储k个内部副本。可以同时使用置换器 调用Permutator.Next()以字典顺序返回下一个排列。如果生成了所有排列,则返回错误 func ( p * Permutator ) Next ()( interface {}, error ) 调用Permutator.NextN()以词法顺序返回下一个n置换。 func ( p * Permut
【文件预览】:
permutation-master
----test()
--------test2.go(498B)
--------test1.go(497B)
--------test1(1.56MB)
----permutation.go(7KB)
----LICENSE(1KB)
----.gitignore(252B)
----README.md(2KB)

网友评论