|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectExamplesJaCoP.Example
ExamplesJaCoP.Nonogram
public class Nonogram
It solves a nonogram example problem, sometimes also called Paint by Numbers.
| Field Summary | |
|---|---|
int |
black
The value that represents a black dot. |
IntVar[][] |
board
A board to be painted in white/black dots. |
int[][] |
col_rules
It specifies a rule for each column. |
boolean |
extensionalMDD
It specifies if one extensional constraint based on MDD created from FSM should be used. |
boolean |
regular
It specifies if the regular constraint should be used. |
int[][] |
row_rules
It specifies a rule for each row. |
boolean |
slideDecomposition
It specifies if the slide based decomposition of the regular constraint should be applied. |
int |
white
The value that represents a white dot. |
| Fields inherited from class ExamplesJaCoP.Example |
|---|
cost, search, store, vars |
| Constructor Summary | |
|---|---|
Nonogram()
|
|
| Method Summary | |
|---|---|
FSM |
createAutomaton(int[] sequence)
It produces and FSM given a sequence representing a rule. |
static void |
main(java.lang.String[] args)
It executes the program which solves this simple problem. |
void |
model()
It specifies a standard way of modeling the problem. |
void |
printMatrix(IntVar[][] matrix)
It prints a matrix of variables. |
void |
readFromFile(java.lang.String filename)
|
boolean |
searchAll()
It specifies simple search method based on most constrained static and lexigraphical ordering of values. |
static void |
test(java.lang.String[] args)
It executes the program which solves this simple problem. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int black
public int white
public IntVar[][] board
public boolean slideDecomposition
public boolean regular
public boolean extensionalMDD
public int[][] row_rules
public int[][] col_rules
| Constructor Detail |
|---|
public Nonogram()
| Method Detail |
|---|
public void readFromFile(java.lang.String filename)
public FSM createAutomaton(int[] sequence)
sequence -
public void model()
Example
model in class Examplepublic boolean searchAll()
public void printMatrix(IntVar[][] matrix)
matrix - matrix containing the grounded variables.public static void main(java.lang.String[] args)
args - no arguments are read.public static void test(java.lang.String[] args)
args - no arguments are read.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||