def row_indices(n, square_length):
    """ Returns the one-dimensional indices of all the cells belonging to the
		same row as index `n`.
	"""
    j = n // square_length
    return range(j * square_length, (j + 1) * square_length)
