|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.cp.model.CPModel
samples.tutorials.to_sort.Picross
public class Picross
This class implements a nonogram strategy.
Field Summary | |
---|---|
IntegerVariable[][] |
dualmyvars
|
IntegerVariable[][] |
myvars
The model variables. |
Fields inherited from class choco.cp.model.CPModel |
---|
_iterator, clausesStore, constantVars, constraints, defDecExp, expVars, floatVars, intVars, LOGGER, nbBoolVar, properties, setVars, storedMultipleVariables |
Constructor Summary | |
---|---|
Picross(int[][] consRows,
int[][] consCols,
Solver s)
Create a new nanogram |
Method Summary | |
---|---|
static void |
main(String[] args)
|
void |
makeConstraint()
Post the regular constraint with the DFAs created earlier |
void |
makeDFAs()
Creates the Automaton used to describe the pattern constraints. |
void |
makeVar()
Creates the choco variable : each variable represents a square, it is wether 0 (white) or 1 (black) |
void |
showSolution(Solver s)
Draw the solution in a new Frame |
String |
toString(Solver solver)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public IntegerVariable[][] myvars
public IntegerVariable[][] dualmyvars
Constructor Detail |
---|
public Picross(int[][] consRows, int[][] consCols, Solver s)
consRows
- The constraint on the rowsconsCols
- The constraint on the columnss
- Method Detail |
---|
public void makeVar()
public void makeDFAs()
public void makeConstraint()
public String toString(Solver solver)
public void showSolution(Solver s)
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |