Generated on Tue Mar 24 2020 14:04:04 for Gecode by doxygen 1.8.17

Abstract base class for comparators. More...

#include <gist.hh>

Comparator interface

virtual void compare (const Space &s0, const Space &s1)=0
 Call-back function. More...
 
virtual std::string name (void)
 Name of the comparator. More...
 
virtual void finalize (void)
 Clean up when Gist exits. More...
 
virtual ~Comparator (void)
 Destructor. More...
 

Helper methods

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

Abstract base class for comparators.

A comparator provides a virtual method that is called when a node in the search tree is compared to another node.

Definition at line 119 of file gist.hh.

Constructor & Destructor Documentation

◆ ~Comparator()

Gecode::Gist::Comparator::~Comparator ( void  )
virtual

Destructor.

Definition at line 58 of file gist.cpp.

Member Function Documentation

◆ compare() [1/6]

virtual void Gecode::Gist::Comparator::compare ( const Space s0,
const Space s1 
)
pure virtual

◆ name()

std::string Gecode::Gist::Comparator::name ( void  )
virtual

Name of the comparator.

Reimplemented in Gecode::Gist::VarComparator< S >.

Definition at line 53 of file gist.cpp.

◆ finalize()

void Gecode::Gist::Comparator::finalize ( void  )
virtual

Clean up when Gist exits.

Reimplemented in Gecode::Gist::VarComparator< S >.

Definition at line 56 of file gist.cpp.

◆ compare() [2/6]

template<class Var >
std::string Gecode::Gist::Comparator::compare ( std::string  x_n,
const VarArgArray< Var > &  x,
const VarArgArray< Var > &  y 
)
static

Return string representation of difference between arrays x and y, which are called x_n.

Definition at line 113 of file gist.hpp.

◆ compare() [3/6]

std::string Gecode::Gist::Comparator::compare ( std::string  x_n,
IntVar  x,
IntVar  y 
)
inlinestatic

Return string representation of difference between x and y, which are called x_n.

Definition at line 66 of file gist.hpp.

◆ compare() [4/6]

std::string Gecode::Gist::Comparator::compare ( std::string  x_n,
BoolVar  x,
BoolVar  y 
)
inlinestatic

Return string representation of difference between x and y, which are called x_n.

Definition at line 76 of file gist.hpp.

◆ compare() [5/6]

std::string Gecode::Gist::Comparator::compare ( std::string  x_n,
SetVar  x,
SetVar  y 
)
inlinestatic

Return string representation of difference between x and y, which are called x_n.

Definition at line 86 of file gist.hpp.

◆ compare() [6/6]

std::string Gecode::Gist::Comparator::compare ( std::string  x_n,
FloatVar  x,
FloatVar  y 
)
inlinestatic

Return string representation of difference between x and y, which are called x_n.

Definition at line 102 of file gist.hpp.


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