MCPcopy Create free account
hub / github.com/CompVis/zigma / zigzag_path_tb

Function zigzag_path_tb

utils/utils_zigzag.py:154–161  ·  view source on GitHub ↗
(N, start_row=0, start_col=0, dir_row=1, dir_col=1)

Source from the content-addressed store, hash-verified

152 return path
153
154 def zigzag_path_tb(N, start_row=0, start_col=0, dir_row=1, dir_col=1):
155 path = []
156 for j in range(N):
157 for i in range(N):
158 # If the column number is even, move down; otherwise, move up
159 row = i if j % 2 == 0 else N - 1 - i
160 path.append((start_row + dir_row * row) * N + start_col + dir_col * j)
161 return path
162
163 paths = []
164 for start_row, start_col, dir_row, dir_col in [

Callers 1

zigzag_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected