PicturePuzzle Class Reference
[Example scripts (models)]
Inherits Example.
Detailed Description
Example: Picture puzzlesThis example solves picture-puzzles. A picture-puzzle is composed of a matrix of markers. For each row/column there is a specification on how many groups of markers (separated by one or more unmarked spots) and their length. The objective is to find a valid assignment, which incidentally may also produce a pretty picture.
Picture puzzles are also called Nonograms.
Problem 12 at http://www.csplib.org/.
Definition at line 44 of file picture-puzzle.cc.
Public Member Functions | |
| PicturePuzzle (const Options &o) | |
| Construction of the model. | |
| PicturePuzzle (bool share, PicturePuzzle &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (bool share) |
| Copy space during cloning. | |
| virtual void | print (void) |
| Print solution. | |
Constructor & Destructor Documentation
| PicturePuzzle::PicturePuzzle | ( | const Options & | o | ) | [inline] |
| PicturePuzzle::PicturePuzzle | ( | bool | share, | |
| PicturePuzzle & | s | |||
| ) | [inline] |
Member Function Documentation
| virtual Space* PicturePuzzle::copy | ( | bool | share | ) | [inline, virtual] |
Copy space during cloning.
Implements Gecode::Space.
Definition at line 110 of file picture-puzzle.cc.
| virtual void PicturePuzzle::print | ( | void | ) | [inline, virtual] |
The documentation for this class was generated from the following file:
- examples/picture-puzzle.cc (Revision: 3517)
