Generated on Mon Aug 25 11:35:48 2008 for Gecode by doxygen 1.5.6

Sudoku Class Reference

Inherits Example.

Inherited by SudokuCpltSet [virtual], SudokuInt [virtual], and SudokuSet [virtual].

List of all members.


Detailed Description

Base class for Sudoku puzzles.

Definition at line 65 of file sudoku.cc.


Sudoku specifications

Each specification gives the initial positions that are filled in, with blank squares represented as zeroes.

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.

Public Types

enum  { MODEL_INT, MODEL_SET, MODEL_MIXED, MODEL_CPLT }
 Model variants. More...

Public Member Functions

 Sudoku (const SizeOptions &opt)
 Constructor.
 Sudoku (bool share, Sudoku &s)
 Constructor for cloning s.

Protected Attributes

const int n
 The size of the problem.

Member Enumeration Documentation

anonymous enum

Model variants.

Enumerator:
MODEL_INT  Use integer constraints.
MODEL_SET  Use set constraints.
MODEL_MIXED  Use both integer and set constraints.
MODEL_CPLT  Use CpltSet constraints.

Definition at line 72 of file sudoku.cc.


Constructor & Destructor Documentation

Sudoku::Sudoku ( const SizeOptions opt  )  [inline]

Constructor.

Definition at line 83 of file sudoku.cc.

Sudoku::Sudoku ( bool  share,
Sudoku s 
) [inline]

Constructor for cloning s.

Definition at line 86 of file sudoku.cc.


Friends And Related Function Documentation

const char* examples[] [related]

The specifications.

Definition at line 570 of file sudoku.cc.

const unsigned int n_examples = sizeof(examples)/sizeof(char*) [related]

The number of instances.

Definition at line 2311 of file sudoku.cc.

int example_size ( const char *  s  )  [related]

The size of an instance.

Definition at line 2314 of file sudoku.cc.

int sudokuField ( const char *  s,
int  n,
int  i,
int  j 
) [related]

Return value at position (i,j) in the example s of size n.

Definition at line 2322 of file sudoku.cc.


Member Data Documentation

const int Sudoku::n [protected]

The size of the problem.

Definition at line 68 of file sudoku.cc.


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