Class L_SUDOKU

java.lang.Object
org.bytedeco.javacpp.Pointer
org.bytedeco.leptonica.L_SUDOKU
All Implemented Interfaces:
AutoCloseable

@Name("L_Sudoku") @Properties(inherit=leptonica.class) public class L_SUDOKU extends Pointer
\file sudoku.h
    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.
 
  • Constructor Details

    • L_SUDOKU

      public L_SUDOKU()
      Default native constructor.
    • L_SUDOKU

      public L_SUDOKU(long size)
      Native array allocator. Access with Pointer.position(long).
    • L_SUDOKU

      public L_SUDOKU(Pointer p)
      Pointer cast constructor. Invokes Pointer(Pointer).
  • Method Details

    • position

      public L_SUDOKU position(long position)
      Overrides:
      position in class Pointer
    • getPointer

      public L_SUDOKU getPointer(long i)
      Overrides:
      getPointer in class Pointer
    • num

      @Cast("l_int32") public int num()
      number of unknowns
    • num

      public L_SUDOKU num(int setter)
    • locs

      @Cast("l_int32*") public IntPointer locs()
      location of unknowns
    • locs

      public L_SUDOKU locs(IntPointer setter)
    • current

      @Cast("l_int32") public int current()
      index into %locs of current location
    • current

      public L_SUDOKU current(int setter)
    • init

      @Cast("l_int32*") public IntPointer init()
      the unknowns
    • init

      public L_SUDOKU init(IntPointer setter)
    • state

      @Cast("l_int32*") public IntPointer state()
      guesses of unknowns up to %current
    • state

      public L_SUDOKU state(IntPointer setter)
    • nguess

      @Cast("l_int32") public int nguess()
      shows current number of guesses
    • nguess

      public L_SUDOKU nguess(int setter)
    • finished

      @Cast("l_int32") public int finished()
      set to 1 when solved
    • finished

      public L_SUDOKU finished(int setter)
    • failure

      @Cast("l_int32") public int failure()
      set to 1 if no solution is possible
    • failure

      public L_SUDOKU failure(int setter)