Generated on Wed Jul 21 2021 00:00:00 for Gecode by doxygen 1.9.1
SudokuSet Class Reference

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

Public Member Functions

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

Protected Attributes

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

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< BaseSpace >
static std::ostream & select_ostream (const char *sn, std::ofstream &ofs)
 Choose output stream according to sn. More...
 
template<class Script , template< class > class Engine, class Options >
static void run (const Options &opt, Script *s=NULL)
 

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  )
inlinevirtual

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
inlinevirtual

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: