Example Class Reference
#include <support.hh>
Inherits Gecode::Space.
Inherited by AllInterval, Alpha, BACP, Baseline, BIBD, BlackHole, Crew, CrowdedChess, Domino, Donald, Eq20, Golf, GolombRuler, GraphColor, Grocery, Hamming, IndSet, JavaScript, Kakuro, Knights, LangfordNumber, MagicSequence, MagicSquare, MineSweeper, Money, Nonogram, OrthoLatinSquare, Partition, Pentominoes, PerfectSquare, Photo, QueenArmies, Queens, SportsLeague, Steiner, StressDistinct, StressDomain, StressElement, StressExec, StressExtensional, StressLinearBool, StressMin, StressSearch, Sudoku, TSP, and Warehouses.
Detailed Description
Base-class for Gecode examples.All examples must inherit from this class
- adds printing to examples
- run allows to execute examples
Definition at line 334 of file support.hh.
Public Member Functions | |
Example (void) | |
Default constructor. | |
Example (bool share, Example &e) | |
Constructor used for cloning. | |
virtual void | print (std::ostream &os) |
Print a solution to os. | |
Static Public Member Functions | |
template<class Script, template< class > class Engine, class Options> | |
static void | run (const Options &opt) |
Run example with search engine Engine and options opt. | |
Protected Member Functions | |
void | sac_collect_vars (void) |
Collect variables for SAC processing. | |
void | sac_remove_vars (void) |
Remove variables after SAC processing. | |
bool | sac (unsigned long int &p) |
Run one round of singleton arc consistency. |
Constructor & Destructor Documentation
Example::Example | ( | void | ) | [inline] |
Example::Example | ( | bool | share, | |
Example & | e | |||
) | [inline] |
Member Function Documentation
virtual void Example::print | ( | std::ostream & | os | ) | [inline, virtual] |
Print a solution to os.
Reimplemented in AllInterval, Alpha, BACP, Baseline, BIBD, BlackHole, Crew, CrowdedChess, Domino, Donald, Eq20, Golf, GolombRuler, GraphColor, Grocery, Hamming, IndSet, JavaScript, Kakuro, Knights, LangfordNumber, MagicSequence, MagicSquare, MineSweeper, Money, Nonogram, OrthoLatinSquare, Partition, Pentominoes, PerfectSquare, Photo, QueenArmies, Queens, SportsLeague, Steiner, StressDistinct, StressDomain, StressElement, StressExec, StressExtensional, StressLinearBool, StressMin, StressSearch, SudokuInt, SudokuSet, SudokuCpltSet, SudokuMixed, TSP, and Warehouses.
Definition at line 345 of file support.hh.
void Example::run | ( | const Options & | opt | ) | [inline, static] |
void Example::sac_collect_vars | ( | void | ) | [protected] |
void Example::sac_remove_vars | ( | void | ) | [protected] |
bool Example::sac | ( | unsigned long int & | p | ) | [protected] |
Run one round of singleton arc consistency.
Returns true if a variable ahs been modified.
Definition at line 87 of file example.cc.
The documentation for this class was generated from the following files:
- examples/support.hh (Revision: 6067)
- examples/support/example.cc (Revision: 5957)
- examples/support/example.icc (Revision: 6425)