WordSquare Class Reference
[Example scripts (models)]
Example: Word-square puzzle More...
Public Types | |
| enum | { BRANCH_WORDS, BRANCH_LETTERS } |
Branching variants. More... | |
Public Member Functions | |
| WordSquare (const SizeOptions &opt) | |
| Actual model. | |
| WordSquare (WordSquare &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (void) |
| Copy during cloning. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
Protected Attributes | |
| const int | w_l |
| Length of words. | |
| IntVarArray | letters |
| The array of letters. | |
Detailed Description
Example: Word-square puzzle
From http://en.wikipedia.org/wiki/Word_square: A word square is a special case of acrostic. It consists of a set of words, all having the same number of letters as the total number of words (the "order" of the square); when the words are written out in a square grid horizontally, the same set of words can be read vertically.
Definition at line 59 of file word-square.cpp.
Member Enumeration Documentation
| anonymous enum |
Branching variants.
Definition at line 67 of file word-square.cpp.
Constructor & Destructor Documentation
| WordSquare::WordSquare | ( | const SizeOptions & | opt | ) | [inline] |
Actual model.
Definition at line 72 of file word-square.cpp.
| WordSquare::WordSquare | ( | WordSquare & | s | ) | [inline] |
Constructor for cloning s.
Definition at line 115 of file word-square.cpp.
Member Function Documentation
| virtual Space* WordSquare::copy | ( | void | ) | [inline, virtual] |
Copy during cloning.
Definition at line 121 of file word-square.cpp.
| virtual void WordSquare::print | ( | std::ostream & | os | ) | const [inline, virtual] |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 126 of file word-square.cpp.
Member Data Documentation
const int WordSquare::w_l [protected] |
Length of words.
Definition at line 62 of file word-square.cpp.
IntVarArray WordSquare::letters [protected] |
The array of letters.
Definition at line 64 of file word-square.cpp.
The documentation for this class was generated from the following file:
- examples/word-square.cpp
