InPlace.Examples.Sudoku (inplace v0.4.3)

Sudoku puzzle. The instance of puzzle is a string of DxD length , where D is a dimension of Sudoku puzzle (would be 9 by default). The values 1 to 9 represent pre-filled cells (clues, givens etc...); any other values represent hidden cells.

Summary

Functions

solution is a list of integers representing the 'flattened' solved puzzle

solution is a "cover" (list of indices into options built off the Sudoku instance). Note: the options only represent "hidden" cells.

Functions

block_item(row, d)

cell_item(row, d)

check_solution(solution)

@spec check_solution([integer()]) :: boolean()

solution is a list of integers representing the 'flattened' solved puzzle

column_item(row, d)

init(instance)

init_exact_cover(instance, d)

instance4()

instance9()

instance29a_knuth()

row_item(row, d)

solution_to_sudoku(solution, instance, options, d)

solution is a "cover" (list of indices into options built off the Sudoku instance). Note: the options only represent "hidden" cells.

solve(instance, opts \\ [])

Solver