Generated on Tue May 31 2016 11:57:30 for Gecode by doxygen 1.8.11
Domino Class Reference

Example: Solitaire domino More...

Public Types

Public Member Functions

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

Related Functions

(Note that these are not member functions.)

const unsigned int n_examples
 Number of board specifications. More...
 
int main (int argc, char *argv[])
 Main-function. More...
 

Puzzle specifications

const int * specs []
 Board specifications. More...
 
const int domino0 []
 Example 0 More...
 
const int domino1 []
 Example 1 More...
 
const int domino2 []
 Example 2 More...
 
const int domino3 []
 Example 3 More...
 
const int domino4 []
 Example 4 More...
 
const int domino5 []
 Example 5 More...
 
const unsigned n_examples = sizeof(specs)/sizeof(int*)
 Number of specifications. More...
 
const int * specs []
 List of specifications. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
static std::ostream & select_ostream (const char *name, std::ofstream &ofs)
 Choose output stream according to name. More...
 
template<class Script , template< class > class Engine, class Options >
static void run (const Options &opt, Script *s=NULL)
 

Detailed Description

Example: Solitaire domino

The task is to place domino pieces on a board. Each piece covers two fields and has two numbers. There are 28 pieces, from 0-0 to 6-6. The board is set up with a number in each field that must match the number of the domino piece placed on that field.

Definition at line 72 of file domino.cpp.

Member Enumeration Documentation

anonymous enum

Propagation to use for model.

Enumerator
PROP_ELEMENT 

Use element constraints.

PROP_EXTENSIONAL 

Use extensional constraints.

Definition at line 86 of file domino.cpp.

Constructor & Destructor Documentation

Domino::Domino ( const SizeOptions opt)
inline

Actual model.

Definition at line 92 of file domino.cpp.

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

Constructor for cloning s.

Definition at line 212 of file domino.cpp.

Member Function Documentation

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

Print solution.

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

Definition at line 199 of file domino.cpp.

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

Copy space during cloning.

Definition at line 218 of file domino.cpp.

Friends And Related Function Documentation

const int* specs[]
related
Initial value:

Board specifications.

List of specifications.

Definition at line 52 of file domino.cpp.

const unsigned int n_examples
related

Number of board specifications.

Definition at line 57 of file domino.cpp.

const int domino0[]
related
Initial value:
=
{
8,7,
2,1,0,3,0,4,5,5,
6,2,0,6,3,1,4,0,
3,2,3,6,2,5,4,3,
5,4,5,1,1,2,1,2,
0,0,1,5,0,5,4,4,
4,6,2,1,3,6,6,1,
4,2,0,6,5,3,3,6
}

Example 0

Definition at line 255 of file domino.cpp.

const int domino1[]
related
Initial value:
=
{
8,7,
5,1,2,4,6,2,0,5,
6,6,4,3,5,0,1,5,
2,0,4,0,4,0,5,0,
6,1,3,6,3,5,4,3,
3,1,0,1,2,2,1,4,
3,6,6,2,4,0,5,4,
1,3,6,1,2,3,5,2
}

Example 1

Definition at line 269 of file domino.cpp.

const int domino2[]
related
Initial value:
=
{
8,7,
4,4,5,4,0,3,6,5,
1,6,0,1,5,3,4,1,
2,6,2,2,5,3,6,0,
1,3,0,6,4,4,2,3,
3,5,5,2,4,2,2,1,
2,1,3,3,5,6,6,1,
5,1,6,0,0,0,4,0
}

Example 2

Definition at line 283 of file domino.cpp.

const int domino3[]
related
Initial value:
=
{
8,7,
3,0,2,3,3,4,4,3,
6,5,3,4,2,0,2,1,
6,5,1,2,3,0,2,0,
4,5,4,1,6,6,2,5,
4,3,6,1,0,4,5,5,
1,3,2,5,6,0,0,1,
0,5,4,6,2,1,6,1
}

Example 3

Definition at line 297 of file domino.cpp.

const int domino4[]
related
Initial value:
=
{
8,7,
4,1,5,2,4,4,6,2,
2,5,6,1,4,6,0,2,
6,5,1,1,0,1,4,3,
6,2,1,1,3,2,0,6,
3,6,3,3,5,5,0,5,
3,0,1,0,0,5,4,3,
3,2,4,5,4,2,6,0
}

Example 4

Definition at line 311 of file domino.cpp.

const int domino5[]
related
Initial value:
=
{
8,7,
4,1,2,1,0,2,4,4,
5,5,6,6,0,4,6,3,
6,0,5,1,1,0,5,3,
3,4,2,2,0,3,1,2,
3,6,5,6,1,2,3,2,
2,5,0,6,6,3,3,5,
4,1,0,0,4,1,4,5
}

Example 5

Definition at line 325 of file domino.cpp.

const unsigned n_examples = sizeof(specs)/sizeof(int*)
related

Number of specifications.

Definition at line 342 of file domino.cpp.

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

Main-function.

Definition at line 229 of file domino.cpp.

const int * specs ( )
related

List of specifications.

Definition at line 339 of file domino.cpp.


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