Package net.sourceforge.lept4j
Class L_Sudoku
java.lang.Object
com.sun.jna.Structure
net.sourceforge.lept4j.L_Sudoku
- Direct Known Subclasses:
- L_Sudoku.ByReference,- L_Sudoku.ByValue
public class L_Sudoku
extends com.sun.jna.Structure
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.
native declaration : sudoku.h:24
This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java or JNA.
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.
native declaration : sudoku.h:24
This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java or JNA.
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classL_Sudoku.ByReferencestatic classL_Sudoku.ByValue
- 
Field SummaryFields Modifier and Type Field Description intcurrentindex into @locs of current location
 C type : l_int32intfailureset to 1 if no solution is possible
 C type : l_int32intfinishedset to 1 when solved
 C type : l_int32com.sun.jna.ptr.IntByReferenceinitinitial state, with 0 representing
 C type : l_int32*com.sun.jna.ptr.IntByReferencelocslocation of unknowns
 C type : l_int32*intnguessshows current number of guesses
 C type : l_int32intnumnumber of unknowns
 C type : l_int32com.sun.jna.ptr.IntByReferencestatepresent state, including inits and
 C type : l_int32*
- 
Constructor Summary
- 
Method SummaryModifier and Type Method Description protected java.util.List<java.lang.String>getFieldOrder()Gets this Structure's field names in their proper order.Methods inherited from class com.sun.jna.StructureallocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField
- 
Field Details- 
numpublic int numnumber of unknowns
 C type : l_int32
- 
locspublic com.sun.jna.ptr.IntByReference locslocation of unknowns
 C type : l_int32*
- 
currentpublic int currentindex into @locs of current location
 C type : l_int32
- 
initpublic com.sun.jna.ptr.IntByReference initinitial state, with 0 representing
 C type : l_int32*
- 
statepublic com.sun.jna.ptr.IntByReference statepresent state, including inits and
 C type : l_int32*
- 
nguesspublic int nguessshows current number of guesses
 C type : l_int32
- 
finishedpublic int finishedset to 1 when solved
 C type : l_int32
- 
failurepublic int failureset to 1 if no solution is possible
 C type : l_int32
 
- 
- 
Constructor Details- 
L_Sudokupublic L_Sudoku()
- 
L_Sudokupublic L_Sudoku(int num, com.sun.jna.ptr.IntByReference locs, int current, com.sun.jna.ptr.IntByReference init, com.sun.jna.ptr.IntByReference state, int nguess, int finished, int failure)- Parameters:
- num- number of unknowns
 C type : l_int32
- locs- location of unknowns
 C type : l_int32*
- current- index into @locs of current location
 C type : l_int32
- init- initial state, with 0 representing
 C type : l_int32*
- state- present state, including inits and
 C type : l_int32*
- nguess- shows current number of guesses
 C type : l_int32
- finished- set to 1 when solved
 C type : l_int32
- failure- set to 1 if no solution is possible
 C type : l_int32
 
- 
L_Sudokupublic L_Sudoku(com.sun.jna.Pointer peer)
 
- 
- 
Method Details- 
getFieldOrderprotected java.util.List<java.lang.String> getFieldOrder()Gets this Structure's field names in their proper order.- Overrides:
- getFieldOrderin class- com.sun.jna.Structure
- Returns:
- list of ordered field names
 
 
-