graycode_integers 函数
以整数序列返回反射 Gray 编码。
语法
combinat:-graycode(n)combinat[graycode](n)
参数与选项
n | 非负整数位数。 |
|---|
示例
- 整数 Gray 编码
combinat:-graycode(3)返回 [0, 1, 3, 2, 6, 7, 5, 4]。
以整数序列返回反射 Gray 编码。
combinat:-graycode(n)combinat[graycode](n)n | 非负整数位数。 |
|---|
combinat:-graycode(3)返回 [0, 1, 3, 2, 6, 7, 5, 4]。