
A simple comparator. More...
#include <gist.hh>
Public Member Functions | |
| VarComparator (std::string name) | |
| Constructor. | |
| virtual void | compare (const Space &s0, const Space &s1) |
| Compare s0 to s1. | |
| virtual std::string | name (void) |
| Return name. | |
| virtual void | finalize (void) |
| Finalize when Gist exits. | |
Public Member Functions inherited from Gecode::Gist::TextOutput | |
| TextOutput (const std::string &name) | |
| Constructor. | |
| void | finalize (void) |
| Clean up when Gist exits. | |
| virtual | ~TextOutput (void) |
| Destructor. | |
Public Member Functions inherited from Gecode::Gist::Comparator | |
| virtual | ~Comparator (void) |
| Destructor. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Gecode::Gist::Comparator | |
| template<class Var > | |
| static std::string | compare (std::string x_n, const VarArgArray< Var > &x, const VarArgArray< Var > &y) |
| Return string representation of difference between arrays x and y, which are called x_n. | |
| static std::string | compare (std::string x_n, IntVar x, IntVar y) |
| Return string representation of difference between x and y, which are called x_n. | |
| static std::string | compare (std::string x_n, BoolVar x, BoolVar y) |
| Return string representation of difference between x and y, which are called x_n. | |
| static std::string | compare (std::string x_n, SetVar x, SetVar y) |
| Return string representation of difference between x and y, which are called x_n. | |
| static std::string | compare (std::string x_n, FloatVar x, FloatVar y) |
| Return string representation of difference between x and y, which are called x_n. | |
Protected Member Functions inherited from Gecode::Gist::TextOutput | |
| void | init (void) |
| Initialize the implementation object. | |
| std::ostream & | getStream (void) |
| Get the stream that is used to output text. | |
| void | flush (void) |
| Flush stream. | |
| void | addHtml (const char *s) |
| Add html text s to the output. | |
A simple comparator.
This class serves two purposes. First, it provides static methods that compare two variables or two arrays of variables and return a string representation of the differences. Second, it implements a Comparator that uses the compare method of the script to output the differences between two spaces.
| Gecode::Gist::VarComparator< S >::VarComparator | ( | std::string | name | ) |
|
virtual |
Compare s0 to s1.
Implements Gecode::Gist::Comparator.
Reimplemented in Gecode::FlatZinc::FZPrintingComparator< S >.
|
virtual |
|
virtual |
Finalize when Gist exits.
Reimplemented from Gecode::Gist::Comparator.