Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
Gecode::Gist::VarComparator< S > Class Template Reference

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.
virtual ~Comparator (void)
 Destructor.

Additional Inherited Members

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.

Detailed Description

template<class S>
class Gecode::Gist::VarComparator< S >

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.

Definition at line 211 of file gist.hh.

Constructor & Destructor Documentation

◆ VarComparator()

template<class S>
Gecode::Gist::VarComparator< S >::VarComparator ( std::string name)

Constructor.

Definition at line 37 of file gist.hpp.

Member Function Documentation

◆ compare()

template<class S>
void Gecode::Gist::VarComparator< S >::compare ( const Space & s0,
const Space & s1 )
virtual

Compare s0 to s1.

Implements Gecode::Gist::Comparator.

Reimplemented in Gecode::FlatZinc::FZPrintingComparator< S >.

Definition at line 42 of file gist.hpp.

◆ name()

template<class S>
std::string Gecode::Gist::VarComparator< S >::name ( void )
virtual

Return name.

Reimplemented from Gecode::Gist::TextOutput.

Definition at line 55 of file gist.hpp.

◆ finalize()

template<class S>
void Gecode::Gist::VarComparator< S >::finalize ( void )
virtual

Finalize when Gist exits.

Reimplemented from Gecode::Gist::Comparator.

Definition at line 61 of file gist.hpp.


The documentation for this class was generated from the following files: