43 std::ostringstream result;
44 dynamic_cast<const S&
>(s0).
compare(s1,result);
45 if (result.str() !=
"") {
69 std::ostringstream ret;
70 ret << x_n <<
"=" << x <<
" -> " << y;
78 std::ostringstream ret;
79 ret << x_n <<
"=" << x <<
" -> " << y;
84#ifdef GECODE_HAS_SET_VARS
93 std::ostringstream ret;
94 ret << x_n <<
"=" << x <<
" -> " << y;
100#ifdef GECODE_HAS_FLOAT_VARS
104 std::ostringstream ret;
105 ret << x_n <<
"=" << x <<
" -> " << y;
116 return "Error: array size mismatch";
117 std::ostringstream ret;
119 for (
int i=0; i<x.
size(); i++) {
120 std::ostringstream xni;
121 xni << x_n <<
"[" << i <<
"]";
122 std::string cmp =
compare(xni.str(),x[i],y[i]);
166 _solution(
heap,1), n_solution(0),
167 _move(
heap,1), n_move(0), _compare(
heap,1), n_compare(0) {}
171 _click[
static_cast<int>(n_click++)] = i;
175 _solution[
static_cast<int>(n_solution++)] = i;
179 _move[
static_cast<int>(n_move++)] = i;
183 _compare[
static_cast<int>(n_compare++)] = c;
187 return (i < n_click) ? _click[i] : NULL;
191 return (i < n_solution) ? _solution[i] : NULL;
195 return (i < n_move) ? _move[i] : NULL;
199 return (i < n_compare) ? _compare[i] : NULL;
204 return explore(root,
false, opt);
int size(void) const
Return size of array (number of elements).
Boolean integer variables.
int max(void) const
Return maximum of domain.
int min(void) const
Return minimum of domain.
FloatNum min(void) const
Return minimum of domain.
FloatNum max(void) const
Return maximum of domain.
Abstract base class for comparators.
virtual void compare(const Space &s0, const Space &s1)=0
Call-back function.
Abstract base class for inspectors.
void click(Inspector *i)
Add inspector that reacts on node double clicks.
void move(Inspector *i)
Add inspector that reacts on each move of the cursor.
void compare(Comparator *c)
Add comparator.
void solution(Inspector *i)
Add inspector that reacts on each new solution that is found.
Options(void)
Initialize with default values.
virtual void inspect(const Space &node)
Use the print method of the template class S to print a space.
virtual std::string name(void)
Return name.
virtual void finalize(void)
Clean up when Gist exits.
Print(const std::string &name)
Constructor.
void finalize(void)
Clean up when Gist exits.
void flush(void)
Flush stream.
TextOutput(const std::string &name)
Constructor.
std::ostream & getStream(void)
Get the stream that is used to output text.
virtual std::string name(void)
Name of the inspector.
void init(void)
Initialize the implementation object.
void addHtml(const char *s)
Add html text s to the output.
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.
Range iterator for integer variables
Iterator for the greatest lower bound ranges of a set variable.
Iterator for the least upper bound ranges of a set variable.
unsigned int cardMax(void) const
Return cardinality maximum.
unsigned int cardMin(void) const
Return cardinality minimum.
Argument array for variables.
Heap heap
The single global heap.
int bab(Space *root, const Gist::Options &opt=Gist::Options::def)
Create a new stand-alone Gist for branch-and-bound search of root.
int dfs(Space *root, const Gist::Options &opt=Gist::Options::def)
Create a new stand-alone Gist for root.
The Gecode Interactive Search Tool.
int explore(Space *root, bool bab, const Options &opt)
Create a new stand-alone Gist for root using bab.
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
void print(std::basic_ostream< Char, Traits > &s, bool assigned, IL &lb, IU &ub, unsigned int cardMin, unsigned int cardMax)
Print set view.
Gecode toplevel namespace