Gecode::CHB Class Reference

Class for CHB management. More...

`#include <chb.hpp>`

## Classes

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

## Protected Member Functions

Storage & | object (void) const
| Return object of correct type.
void | object (Storage &o)
| Set object to o.
void | update (int i)
| Update chb value at position i.
void | acquire (void)
| Acquire mutex.
void | release (void)
| Release mutex.
void | bump (void)
| Bump failure count and alpha.
void | update (int i, bool failed)
| Update chb information at position i.
Protected Member Functions inherited from Gecode::SharedHandle
SharedHandle::Object * | object (void) const
| Access to the shared object.
void | object (SharedHandle::Object *n)
| Modify shared object.

## Related Symbols

(Note that these are not member symbols.)
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.

## Constructors and initialization

static const CHB | def
| Default (empty) chb information.
| CHB (void)
| Construct as not yet intialized.
| CHB (const CHB &a)
| Copy constructor.
CHB & | operator= (const CHB &a)
| Assignment operator.
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.
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.
| ~CHB (void)
| Destructor.

## Information access

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

## Additional Inherited Members

Public Member Functions inherited from Gecode::SharedHandle
| SharedHandle (void)
| Create shared handle with no object pointing to.
| SharedHandle (SharedHandle::Object *so)
| Create shared handle that points to shared object so.
| SharedHandle (const SharedHandle &sh)
| Copy constructor maintaining reference count.
SharedHandle & | operator= (const SharedHandle &sh)
| Assignment operator maintaining reference count.
| ~SharedHandle (void)
| Destructor that maintains reference count.
| operator bool (void) const
| Whether handle points to an object.

## 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 46 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 346 of file chb.hpp.

## CHB() [2/3]

Gecode::CHB::CHB | ( | const CHB & | a | ) |

Copy constructor.

Definition at line 46 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 350 of file chb.hpp.

## ~CHB()

Gecode::CHB::~CHB | ( | void |  | ) |

Destructor.

Definition at line 55 of file chb.cpp.

## Member Function Documentation

## object() [1/2]

CHB::Storage & Gecode::CHB::object | ( | void |  | ) | const

inline protected

Return object of correct type.

Definition at line 310 of file chb.hpp.

## object() [2/2]

void Gecode::CHB::object | ( | CHB::Storage & | o | ) |

inline protected

Set object to o.

Definition at line 315 of file chb.hpp.

## update() [1/2]

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

protected

Update chb value at position i.

## acquire()

void Gecode::CHB::acquire | ( | void |  | ) |

inline protected

Acquire mutex.

Definition at line 329 of file chb.hpp.

## release()

void Gecode::CHB::release | ( | void |  | ) |

inline protected

Release mutex.

Definition at line 333 of file chb.hpp.

## bump()

void Gecode::CHB::bump | ( | void |  | ) |

inline protected

Bump failure count and alpha.

Definition at line 337 of file chb.hpp.

## update() [2/2]

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

inline protected

Update chb information at position i.

Definition at line 341 of file chb.hpp.

## operator=()

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

Assignment operator.

Definition at line 50 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 358 of file chb.hpp.

## operator[]()

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

inline

Return chb value at position i.

Definition at line 320 of file chb.hpp.

## size()

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

inline

Return number of chb values.

Definition at line 325 of file chb.hpp.

## Friends And Related Symbol 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 358 of file chb.hpp.

## Member Data Documentation

## def

const CHB Gecode::CHB::def

static

Default (empty) chb information.

Definition at line 123 of file chb.hpp.

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

- gecode/kernel/branch/chb.hpp
- gecode/kernel/branch/chb.cpp