Generated on Tue Jan 28 2020 00:00:00 for Gecode by doxygen 1.8.17
Gecode::CHB Class Reference

Class for CHB management. More...

#include <chb.hpp>

Classes

class  Info
 View information. More...
 
class  Recorder
 Propagator for recording chb information. More...
 
class  Storage
 Object for storing chb information. More...
 

Protected Member Functions

void update (int i)
 Update chb value at position i. More...
 
void acquire (void)
 Acquire mutex. More...
 
void release (void)
 Release mutex. More...
 
void bump (void)
 Bump failure count and alpha. More...
 
void update (int i, bool failed)
 Update chb information at position i. More...
 

Protected Attributes

Storagestorage
 Pointer to storage object. More...
 

Related Functions

(Note that these are not member functions.)

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const CHB &a)
 Print chb values enclosed in curly brackets. More...
 

Constructors and initialization

static const CHB def
 Default (empty) chb information. More...
 
 CHB (void)
 Construct as not yet intialized. More...
 
 CHB (const CHB &a)
 Copy constructor. More...
 
CHBoperator= (const CHB &a)
 Assignment operator. More...
 
template<class View >
 CHB (Home home, ViewArray< View > &x, typename BranchTraits< typename View::VarType >::Merit bm)
 Initialize for views x and Q-score as defined by bm. More...
 
template<class View >
void init (Home home, ViewArray< View > &x, typename BranchTraits< typename View::VarType >::Merit bm)
 Initialize for views x and Q-score as defined by bm. More...
 
 operator bool (void) const
 Test whether already initialized. More...
 

Update and delete chb information

void update (Space &home, bool share, CHB &a)
 Updating during cloning. More...
 
 ~CHB (void)
 Destructor. More...
 

Information access

double operator[] (int i) const
 Return chb value at position i. More...
 
int size (void) const
 Return number of chb values. More...
 

Detailed Description

Class for CHB management.

The idea is taken from: Exponential Recency Weighted Average Branching Heuristic for SAT Solvers, Jia Hui Liang, Vijay Ganesh, Pascal Poupart, Krzysztof Czarnecki, AAAI 2016, pages 3434-3440.

Definition at line 50 of file chb.hpp.

Constructor & Destructor Documentation

◆ CHB() [1/3]

Gecode::CHB::CHB ( void  )
inline

Construct as not yet intialized.

The only member functions that can be used on a constructed but not yet initialized chb storage is init and the assignment operator.

Definition at line 351 of file chb.hpp.

◆ CHB() [2/3]

Gecode::CHB::CHB ( const CHB a)

Copy constructor.

Definition at line 44 of file chb.cpp.

◆ CHB() [3/3]

template<class View >
Gecode::CHB::CHB ( Home  home,
ViewArray< View > &  x,
typename BranchTraits< typename View::VarType >::Merit  bm 
)
inline

Initialize for views x and Q-score as defined by bm.

Definition at line 360 of file chb.hpp.

◆ ~CHB()

Gecode::CHB::~CHB ( void  )

Destructor.

Definition at line 74 of file chb.cpp.

Member Function Documentation

◆ update() [1/3]

void Gecode::CHB::update ( int  i)
protected

Update chb value at position i.

◆ acquire()

void Gecode::CHB::acquire ( void  )
inlineprotected

Acquire mutex.

Definition at line 334 of file chb.hpp.

◆ release()

void Gecode::CHB::release ( void  )
inlineprotected

Release mutex.

Definition at line 338 of file chb.hpp.

◆ bump()

void Gecode::CHB::bump ( void  )
inlineprotected

Bump failure count and alpha.

Definition at line 342 of file chb.hpp.

◆ update() [2/3]

void Gecode::CHB::update ( int  i,
bool  failed 
)
inlineprotected

Update chb information at position i.

Definition at line 346 of file chb.hpp.

◆ operator=()

CHB & Gecode::CHB::operator= ( const CHB a)

Assignment operator.

Definition at line 54 of file chb.cpp.

◆ init()

template<class View >
void Gecode::CHB::init ( Home  home,
ViewArray< View > &  x,
typename BranchTraits< typename View::VarType >::Merit  bm 
)
inline

Initialize for views x and Q-score as defined by bm.

Definition at line 368 of file chb.hpp.

◆ operator bool()

Gecode::CHB::operator bool ( void  ) const
inline

Test whether already initialized.

Definition at line 354 of file chb.hpp.

◆ update() [3/3]

void Gecode::CHB::update ( Space home,
bool  share,
CHB a 
)

Updating during cloning.

Definition at line 86 of file chb.cpp.

◆ operator[]()

double Gecode::CHB::operator[] ( int  i) const
inline

Return chb value at position i.

Definition at line 325 of file chb.hpp.

◆ size()

int Gecode::CHB::size ( void  ) const
inline

Return number of chb values.

Definition at line 330 of file chb.hpp.

Friends And Related Function Documentation

◆ operator<<()

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > &  os,
const CHB a 
)
related

Print chb values enclosed in curly brackets.

Definition at line 377 of file chb.hpp.

Member Data Documentation

◆ storage

Storage* Gecode::CHB::storage
protected

Pointer to storage object.

Definition at line 89 of file chb.hpp.

◆ def

const CHB Gecode::CHB::def
static

Default (empty) chb information.

Definition at line 128 of file chb.hpp.


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