|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--mit.ai.techniques.Puzzle
This class will construct the row and column data for a Paint By Numbers problem, if given a two-dimensional array that describes the binary picture to be encoded (true == black, false == white).
| Field Summary | |
private java.util.Vector[] |
colData
|
private java.util.Vector[] |
rowData
|
| Constructor Summary | |
Puzzle(boolean[][] puzzleData)
Construct the puzzle. |
|
Puzzle(java.io.File puzzleFile)
Construct the puzzle from a file. |
|
| Method Summary | |
private void |
createColData(boolean[][] binaryImData)
Create the row encodings. |
private void |
createRowData(boolean[][] binaryImData)
Create the column encodings. |
java.util.Vector[] |
getColData()
Return the column encodings. |
int |
getHeight()
Get the puzzle height. |
java.util.Vector[] |
getRowData()
Return the row encodings. |
int |
getWidth()
Get the puzzle width. |
private void |
readPuzzleFile(java.io.File puzzleFile)
Parse the puzzle file and create the puzzle. |
java.lang.String |
toString()
Create a string version of the encodings for this puzzle. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.util.Vector[] rowData
private java.util.Vector[] colData
| Constructor Detail |
public Puzzle(boolean[][] puzzleData)
public Puzzle(java.io.File puzzleFile)
| Method Detail |
public int getWidth()
public int getHeight()
private void readPuzzleFile(java.io.File puzzleFile)
public java.util.Vector[] getRowData()
public java.util.Vector[] getColData()
private void createRowData(boolean[][] binaryImData)
private void createColData(boolean[][] binaryImData)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||