Parametric base-class for scripts. More...
#include <driver.hh>
Public Member Functions | |
ScriptBase (const Options &opt) | |
Constructor. More... | |
ScriptBase (bool share, ScriptBase &e) | |
Constructor used for cloning. More... | |
virtual void | print (std::ostream &os) const |
Print a solution to os. More... | |
virtual void | compare (const Space &home, std::ostream &os) const |
Compare with s. More... | |
Static Public Member Functions | |
static std::ostream & | select_ostream (const char *name, std::ofstream &ofs) |
Choose output stream according to name. More... | |
template<class Script , template< class > class Engine, class Options > | |
static void | run (const Options &opt, Script *s=NULL) |
Parametric base-class for scripts.
All scripts must inherit from this class
|
inline |
Constructor.
Definition at line 211 of file script.hpp.
|
inline |
Constructor used for cloning.
Definition at line 216 of file script.hpp.
|
virtual |
Print a solution to os.
Reimplemented in Kakuro, BinPacking, Pentominoes, ColoredMatrix, GraphColor, SudokuMixed, CarSequencing, CrowdedChess, SudokuSet, SportsLeague, SteelMill, TSP, PerfectSquare, EFPA, OpenShop, BlackHole, QCP, BACP, Knights, MultiBinPacking, Crossword, SudokuInt, Radiotherapy, Domino, Nonogram, LangfordNumber, Warehouses, Golf, BIBD, OrthoLatinSquare, QueenArmies, Sat, Crew, Photo, DominatingQueens, Steiner, WordSquare, MagicSquare, Alpha, MineSweeper, IndSet, GoldenSpiral, Schur, Hamming, GolombRuler, Queens, Donald, Partition, ArchimedeanSpiral, AllInterval, DescartesFolium, Eq20, MagicSequence, CartesianHeart, Money, and Grocery.
Definition at line 221 of file script.hpp.
|
virtual |
Compare with s.
Definition at line 225 of file script.hpp.
|
static |
Choose output stream according to name.
Definition at line 229 of file script.hpp.
|
static |
Run script with search engine Engine and options opt
In the solution and stat modes, search can be aborted by sending SIGINT to the process (i.e., pressing Ctrl-C on the command line).
In case s is different from NULL, the search engine uses s as root of the search tree.
Definition at line 255 of file script.hpp.