Generated on Mon Sep 17 2012 22:20:51 for Gecode by doxygen 1.8.1.1
Crossword Class Reference

Example: Crossword puzzle More...

List of all members.

Public Types

enum  { BRANCH_WORDS, BRANCH_LETTERS }
 Branching to use for model. More...

Public Member Functions

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

Protected Attributes

const int h
 Height of crossword grid.
IntVarArray letters
 Letters for grid.

Static Protected Attributes

const int w
 Width of crossword grid.

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: Crossword puzzle

Fill crossword grids with words, that is construct a crossword puzzle. For a recent paper on this classical problem, see: Crossword Puzzles as a Constraint Problem, Anbulagan and Adi Botea, CP 2008, pages 550-554, Springer Verlag.

Note that "Modeling and Programming with Gecode" uses this example as a case study.

Definition at line 70 of file crossword.cpp.


Member Enumeration Documentation

anonymous enum

Branching to use for model.

Enumerator:
BRANCH_WORDS 

Branch on the words.

BRANCH_LETTERS 

Branch on the letters.

Definition at line 80 of file crossword.cpp.


Constructor & Destructor Documentation

Crossword::Crossword ( const SizeOptions opt)
inline

Actual model.

Definition at line 85 of file crossword.cpp.

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

Constructor for cloning s.

Definition at line 155 of file crossword.cpp.


Member Function Documentation

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

Copy during cloning.

Definition at line 161 of file crossword.cpp.

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

Print solution.

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

Definition at line 166 of file crossword.cpp.


Member Data Documentation

const int Crossword::w
staticprotected

Width of crossword grid.

Definition at line 73 of file crossword.cpp.

const int Crossword::h
protected

Height of crossword grid.

Definition at line 75 of file crossword.cpp.

IntVarArray Crossword::letters
protected

Letters for grid.

Definition at line 77 of file crossword.cpp.


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