Gecode::Brancher Class Reference
[Programming actors]
Base-class for branchers. More...
#include <core.hpp>
Protected Member Functions | |
Brancher (Home home) | |
Constructor for creation. | |
Brancher (Space &home, bool share, Brancher &b) | |
Constructor for cloning b. | |
Brancher | |
| |
virtual bool | status (const Space &home) const =0 |
Check status of brancher, return true if alternatives left. | |
virtual const Choice * | choice (Space &home)=0 |
Return choice. | |
virtual const Choice * | choice (const Space &home, Archive &e)=0 |
Return choice from e. | |
virtual ExecStatus | commit (Space &home, const Choice &c, unsigned int a)=0 |
Commit for choice c and alternative a. | |
unsigned int | id (void) const |
Return unsigned brancher id. |
Detailed Description
Base-class for branchers.
Note that branchers cannot be created inside a propagator (no idea why one would like to do that anyway). If you do that the system will explode in a truly interesting way.
Definition at line 1004 of file core.hpp.
Constructor & Destructor Documentation
Gecode::Brancher::Brancher | ( | Home | home | ) | [inline, protected] |
Member Function Documentation
virtual bool Gecode::Brancher::status | ( | const Space & | home | ) | const [pure virtual] |
Check status of brancher, return true if alternatives left.
This method is called when Space::status is called, it determines whether to continue branching with this brancher or move on to the (possibly) next brancher.
Implemented in CDBF, BlackHoleBranch, Warnsdorff, QueenArmies::QueenBranch, Radiotherapy::NestedSearch, SteelMill::SteelMillBranch, Gecode::Gist::StopBrancher, Gecode::FunctionBranch, and Gecode::ViewBrancher< ViewSel >.
Return choice.
Note that this method relies on the fact that it is called immediately after a previous call to status. Moreover, the member function can only be called once.
Implemented in CDBF, BlackHoleBranch, Warnsdorff, QueenArmies::QueenBranch, Radiotherapy::NestedSearch, SteelMill::SteelMillBranch, Gecode::Gist::StopBrancher, Gecode::Int::Branch::ViewValuesBrancher< ViewSel, View >, Gecode::FunctionBranch, and Gecode::ViewValBrancher< ViewSel, ValSel >.
Return choice from e.
Implemented in CDBF, BlackHoleBranch, Warnsdorff, QueenArmies::QueenBranch, Radiotherapy::NestedSearch, SteelMill::SteelMillBranch, Gecode::Gist::StopBrancher, Gecode::Int::Branch::ViewValuesBrancher< ViewSel, View >, Gecode::FunctionBranch, and Gecode::ViewValBrancher< ViewSel, ValSel >.
virtual ExecStatus Gecode::Brancher::commit | ( | Space & | home, | |
const Choice & | c, | |||
unsigned int | a | |||
) | [pure virtual] |
Commit for choice c and alternative a.
The current brancher in the space home performs a commit from the information provided by the choice c and the alternative a.
Implemented in CDBF, BlackHoleBranch, Warnsdorff, QueenArmies::QueenBranch, Radiotherapy::NestedSearch, SteelMill::SteelMillBranch, Gecode::Gist::StopBrancher, Gecode::Int::Branch::ViewValuesBrancher< ViewSel, View >, Gecode::FunctionBranch, and Gecode::ViewValBrancher< ViewSel, ValSel >.
unsigned int Gecode::Brancher::id | ( | void | ) | const [inline] |
The documentation for this class was generated from the following file:
- gecode/kernel/core.hpp (Revision: 12538)