Generated on Sat Aug 25 2012 03:33:02 for Gecode by doxygen 1.8.1.2
SudokuInt Class Reference

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

Public Types

enum  { PROP_NONE, PROP_SAME }
 Propagation variants. More...
- 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
}

Public Member Functions

 SudokuInt (const SizeOptions &opt)
 Constructor.
 SudokuInt (bool share, SudokuInt &s)
 Constructor for cloning s.
virtual Spacecopy (bool share)
 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 (bool share, Sudoku &s)
 Constructor for cloning s.
- 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

IntVarArray x
 Values for the fields.

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)
- Static Protected Attributes inherited from Sudoku
const int n
 The size of the problem.

Detailed Description

Example: Solving Sudoku puzzles using integer constraints

Definition at line 99 of file sudoku.cpp.

Member Enumeration Documentation

anonymous enum

Propagation variants.

Enumerator:
PROP_NONE 

No additional constraints.

PROP_SAME 

Use "same" constraint with integer model.

Definition at line 106 of file sudoku.cpp.

Constructor & Destructor Documentation

SudokuInt::SudokuInt ( const SizeOptions opt)
inline

Constructor.

Definition at line 112 of file sudoku.cpp.

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

Constructor for cloning s.

Definition at line 189 of file sudoku.cpp.

Member Function Documentation

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

Perform copying during cloning.

Reimplemented in SudokuMixed.

Definition at line 195 of file sudoku.cpp.

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

Print solution.

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

Reimplemented in SudokuMixed.

Definition at line 201 of file sudoku.cpp.

Member Data Documentation

IntVarArray SudokuInt::x
protected

Values for the fields.

Definition at line 102 of file sudoku.cpp.


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