MCPcopy Create free account
hub / github.com/ActiveState/code / build_index

Function build_index

recipes/Python/578062_Markov/recipe-578062.py:299–306  ·  view source on GitHub ↗
(grid, block_size, word_size, index)

Source from the content-addressed store, hash-verified

297
298# create an index to access the grid with
299def build_index(grid, block_size, word_size, index):
300 for number in range(block_size):
301 index.append(number)
302 if len(index) == word_size:
303 check_cell(grid, block_size, word_size, index)
304 else:
305 build_index(grid, block_size, word_size, index)
306 index.pop()
307
308# compares the contents of a cell along each grid axis
309def check_cell(grid, block_size, word_size, index):

Callers 1

check_gridFunction · 0.70

Calls 4

rangeFunction · 0.85
check_cellFunction · 0.85
appendMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected