|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.examples.dancing.Sudoku
public class Sudoku
This class uses the dancing links algorithm from Knuth to solve sudoku puzzles. It has solved 42x42 puzzles in 1.02 seconds.
| Nested Class Summary | |
|---|---|
protected static interface |
Sudoku.ColumnName
This interface is a marker class for the columns created for the Sudoku solver. |
| Constructor Summary | |
|---|---|
Sudoku(java.io.InputStream stream)
Set up a puzzle board to the given size. |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
Solves a set of sudoku puzzles. |
void |
solve()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sudoku(java.io.InputStream stream)
throws java.io.IOException
stream - The input stream to read the data from
java.io.IOException| Method Detail |
|---|
public void solve()
public static void main(java.lang.String[] args)
throws java.io.IOException
args - a list of puzzle filenames to solve
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||