SudokuSet Class Reference
Example scripts (models)

Example: Solving Sudoku puzzles using set constraints More...

## Public Member Functions

| SudokuSet (const SizeOptions &opt)
| Constructor.
| SudokuSet (SudokuSet &s)
| Constructor for cloning s.
virtual Space * | copy (void)
| Perform copying during cloning.
virtual void | print (std::ostream &os) const
| Print solution.
Public Member Functions inherited from Sudoku
| Sudoku (const SizeOptions &opt)
| Constructor.
| Sudoku (Sudoku &s)
| Constructor for cloning s.
| Sudoku (const SizeOptions &opt)
| Constructor.
| Sudoku (Sudoku &s)
| Constructor for cloning s.
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
| ScriptBase (const Options &opt)
| Constructor.
| ScriptBase (ScriptBase &e)
| Constructor used for cloning.
virtual void | compare (const Space &home, std::ostream &os) const
| Compare with s.
Public Member Functions inherited from Gecode::Driver::IgnoreStepOption< BaseSpace >
| IgnoreStepOption (const Options &)
| Constructor.
| IgnoreStepOption (BaseSpace &e)
| Constructor used for cloning.

## Protected Attributes

SetVarArray | y
| The fields occupied by a certain number.
Protected Attributes inherited from Sudoku
const int | n
| The size of the problem.
IntVarArray | x
| Values for the fields.

## Additional Inherited Members

Public Types inherited from Sudoku
enum | { MODEL_INT , MODEL_SET , MODEL_MIXED }
| Model variants. More...
enum | { BRANCH_NONE , BRANCH_SIZE , BRANCH_SIZE_DEGREE , BRANCH_SIZE_AFC , BRANCH_AFC }
Static Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs)
| Choose output stream according to sn.
static void | run (const Options &opt, Script *s=NULL)
Related Symbols inherited from Sudoku
int | main (int argc, char *argv[])
| Main-function.
const char * | examples []
| The specifications.
const unsigned int | n_examples = sizeof(examples)/sizeof(char*)
| The number of instances.
int | example_size (const char *s)
| The size of an instance.
int | sudokuField (const char *s, int n, int i, int j)
| Return value at position (i,j) in the example s of size n.

## Detailed Description

Example: Solving Sudoku puzzles using set constraints

Definition at line 240 of file sudoku-advanced.cpp.

## Constructor & Destructor Documentation

## SudokuSet() [1/2]

SudokuSet::SudokuSet | ( | const SizeOptions & | opt | ) |

inline

Constructor.

Definition at line 246 of file sudoku-advanced.cpp.

## SudokuSet() [2/2]

SudokuSet::SudokuSet | ( | SudokuSet & | s | ) |

inline

Constructor for cloning s.

Definition at line 319 of file sudoku-advanced.cpp.

## Member Function Documentation

## copy()

virtual Space * SudokuSet::copy | ( | void |  | ) |

inline virtual

Perform copying during cloning.

Reimplemented from Sudoku.

Reimplemented in SudokuMixed.

Definition at line 325 of file sudoku-advanced.cpp.

## print()

virtual void SudokuSet::print | ( | std::ostream & | os | ) | const

inline virtual

Print solution.

Reimplemented from Sudoku.

Reimplemented in SudokuMixed.

Definition at line 331 of file sudoku-advanced.cpp.

## Member Data Documentation

## y

SetVarArray SudokuSet::y

protected

The fields occupied by a certain number.

Definition at line 243 of file sudoku-advanced.cpp.

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

- examples/sudoku-advanced.cpp