(N)
| 121 | |
| 122 | |
| 123 | def gilbert_zigzag_path(N): |
| 124 | width = height = N |
| 125 | order_index = np.zeros((width, height), dtype=int) |
| 126 | for x in range(width): |
| 127 | for y in range(height): |
| 128 | idx = gilbert_xy2d(x, y, width, height) |
| 129 | order_index[x, y] = idx |
| 130 | return order_index |
| 131 | |
| 132 | |
| 133 | ################## |
no test coverage detected