Leptonica 1.68
C Image Processing Library

sudoku.h File Reference

Sudoku related structures. More...

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

Sudoku related structures.

  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.


Typedef Documentation

typedef struct L_Sudoku L_SUDOKU

Definition at line 51 of file sudoku.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
L_SUDOKU_INIT 
L_SUDOKU_STATE 

Definition at line 55 of file sudoku.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines