Leptonica  1.82.0
Image processing and image analysis suite
sudoku.h File Reference

Go to the source code of this file.

Data Structures

struct  L_Sudoku
 

Typedefs

typedef struct L_Sudoku L_SUDOKU
 

Enumerations

enum  { L_SUDOKU_INIT = 0 , L_SUDOKU_STATE = 1 }
 

Detailed Description

   The L_Sudoku holds all the information of the current state.

   The input to sudokuCreate() is a file with any number of lines
   starting with '#', followed by 9 lines consisting of 9 numbers
   in each line.  These have the known values and use 0 for the unknowns.
   Blank lines are ignored.

   The locs array holds the indices of the unknowns, numbered
   left-to-right and top-to-bottom from 0 to 80.  The array size
   is initialized to num.  current is the index into the locs
   array of the current guess: locs[current].

   The state array is used to determine the validity of each guess.
   It is of size 81, and is initialized by setting the unknowns to 0
   and the knowns to their input values.

Definition in file sudoku.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

For printing out array data

Sudoku Output

Definition at line 70 of file sudoku.h.