Generated on Thu Feb 21 2013 23:11:55 for Gecode by doxygen 1.8.3.1
WordSquare Class Reference

Example: Word-square puzzle More...

Public Types

enum  { BRANCH_WORDS, BRANCH_LETTERS }
 Branching variants. More...
 

Public Member Functions

 WordSquare (const SizeOptions &opt)
 Actual model. More...
 
 WordSquare (bool share, WordSquare &s)
 Constructor for cloning s. More...
 
virtual Spacecopy (bool share)
 Copy during cloning. More...
 
virtual void print (std::ostream &os) const
 Print solution. More...
 
- Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
 ScriptBase (void)
 Default constructor. More...
 
 ScriptBase (bool share, ScriptBase &e)
 Constructor used for cloning. More...
 
virtual void compare (const Space &, std::ostream &os) const
 Compare with s. More...
 
template<class Script , template< class > class Engine, class Options >
void run (const Options &o)
 

Protected Attributes

const int w_l
 Length of words. More...
 
IntVarArray letters
 The array of letters. More...
 

Related Functions

(Note that these are not member functions.)

int main (int argc, char *argv[])
 Main-function. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
template<class Script , template< class > class Engine, class Options >
static void run (const Options &opt)
 

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 63 of file word-square.cpp.

Member Enumeration Documentation

anonymous enum

Branching variants.

Enumerator
BRANCH_WORDS 

Branch on word variables.

BRANCH_LETTERS 

Branch on letter variables.

Definition at line 71 of file word-square.cpp.

Constructor & Destructor Documentation

WordSquare::WordSquare ( const SizeOptions opt)
inline

Actual model.

Definition at line 76 of file word-square.cpp.

WordSquare::WordSquare ( bool  share,
WordSquare s 
)
inline

Constructor for cloning s.

Definition at line 119 of file word-square.cpp.

Member Function Documentation

virtual Space* WordSquare::copy ( bool  share)
inlinevirtual

Copy during cloning.

Definition at line 125 of file word-square.cpp.

virtual void WordSquare::print ( std::ostream &  os) const
inlinevirtual

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

Definition at line 130 of file word-square.cpp.

Friends And Related Function Documentation

int main ( int  argc,
char *  argv[] 
)
related

Main-function.

Definition at line 190 of file crossword.cpp.

Member Data Documentation

const int WordSquare::w_l
protected

Length of words.

Definition at line 66 of file word-square.cpp.

IntVarArray WordSquare::letters
protected

The array of letters.

Definition at line 68 of file word-square.cpp.


The documentation for this class was generated from the following files: