Generated on Wed Mar 19 07:30:07 2008 for Gecode by doxygen 1.5.5

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.

List of all members.


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]

Default constructor.

Definition at line 337 of file support.hh.

Example::Example ( bool  share,
Example e 
) [inline]

Constructor used for cloning.

Update SAC variables

Definition at line 339 of file support.hh.


Member Function Documentation

template<class Script, template< class > class Engine, class Options>
void Example::run ( const Options opt  )  [inline, static]

Run example with search engine Engine and options opt.

Definition at line 188 of file example.icc.

void Example::sac_collect_vars ( void   )  [protected]

Collect variables for SAC processing.

Definition at line 65 of file example.cc.

void Example::sac_remove_vars ( void   )  [protected]

Remove variables after SAC processing.

Definition at line 82 of file example.cc.

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: