|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectExamplesJaCoP.Example
ExamplesJaCoP.CrossWord
public class CrossWord
It is an example of the power of ExtensionalSupportMDD constraint which can be used to efficiently model and solve CrossWord puzzles.
| Nested Class Summary | |
|---|---|
class |
CrossWord.PrintListener
It is a simple print listener to print every tenth solution encountered. |
| Field Summary |
|---|
| Fields inherited from class ExamplesJaCoP.Example |
|---|
cost, search, store, vars |
| Constructor Summary | |
|---|---|
CrossWord()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
It executes the program to create a model and solve crossword problem. |
void |
model()
model() |
void |
printSolution()
It prints a variable matrix. |
void |
readDictionaryFromFile(java.lang.String file,
java.util.ArrayList<java.lang.Integer> wordSizes)
It reads a dictionary. |
boolean |
searchAllAtOnceNoRecord()
It searches for all solutions. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CrossWord()
| Method Detail |
|---|
public void model()
model in class Examplepublic void printSolution()
public void readDictionaryFromFile(java.lang.String file,
java.util.ArrayList<java.lang.Integer> wordSizes)
file - filename containing dictionarywordSizes - public boolean searchAllAtOnceNoRecord()
public static void main(java.lang.String[] args)
args - no arguments used.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||