Gecode::Branching Class Reference
[Programming actors]
Inherits Gecode::Actor.
Inherited by BlackHoleBranch [private]
, Gecode::ViewValAssignment< View, Val, ValSel >, Gecode::ViewValBranching< View, Val, ViewSel, ValSel >, QueenArmies::QueenBranch [private]
, and Test::Search::NaryBranching.
Detailed Description
Base-class for branchings.Note that branchings 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 929 of file core.icc.
Branching | |
virtual bool | status (const Space *home) const =0 |
Check status of branching, return true if alternatives left. | |
virtual const BranchingDesc * | description (const Space *home) const =0 |
Return branching description. | |
virtual ExecStatus | commit (Space *home, const BranchingDesc *d, unsigned int a)=0 |
Commit for branching description d and alternative a. | |
Reflection | |
virtual Reflection::BranchingSpec | branchingSpec (const Space *home, Reflection::VarMap &m, const BranchingDesc *d) const |
Specification for BranchingDesc d. | |
Protected Member Functions | |
Branching (Space *home) | |
Constructor for creation. | |
Branching (Space *home, bool share, Branching &b) | |
Constructor for cloning b. |
Constructor & Destructor Documentation
Gecode::Branching::Branching | ( | Space * | home | ) | [inline, protected] |
Member Function Documentation
virtual bool Gecode::Branching::status | ( | const Space * | home | ) | const [pure virtual] |
Check status of branching, return true if alternatives left.
This method is called when Space::status is called, it determines whether to continue branching with this branching or move on to the (possibly) next branching.
Implemented in BlackHoleBranch, QueenArmies::QueenBranch, Gecode::ViewValBranching< View, Val, ViewSel, ValSel >, Gecode::ViewValAssignment< View, Val, ValSel >, and Test::Search::NaryBranching.
virtual const BranchingDesc* Gecode::Branching::description | ( | const Space * | home | ) | const [pure virtual] |
Return branching description.
Note that this method can rely on the fact that it is called immediately after a previous call to status. Hence, it is safe to remember computation from status in order to speed up description.
Implemented in BlackHoleBranch, QueenArmies::QueenBranch, Gecode::ViewValBranching< View, Val, ViewSel, ValSel >, Gecode::ViewValAssignment< View, Val, ValSel >, and Test::Search::NaryBranching.
virtual ExecStatus Gecode::Branching::commit | ( | Space * | home, | |
const BranchingDesc * | d, | |||
unsigned int | a | |||
) | [pure virtual] |
Commit for branching description d and alternative a.
The current branching in the space home performs a commit from the information provided by the branching description d and the alternative a.
Implemented in BlackHoleBranch, QueenArmies::QueenBranch, Gecode::ViewValBranching< View, Val, ViewSel, ValSel >, Gecode::ViewValAssignment< View, Val, ValSel >, and Test::Search::NaryBranching.
Reflection::BranchingSpec Gecode::Branching::branchingSpec | ( | const Space * | home, | |
Reflection::VarMap & | m, | |||
const BranchingDesc * | d | |||
) | const [virtual] |
Specification for BranchingDesc d.
Reimplemented in Gecode::ViewValBranching< View, Val, ViewSel, ValSel >, and Gecode::ViewValAssignment< View, Val, ValSel >.
The documentation for this class was generated from the following files:
- gecode/kernel/core.icc (Revision: 7332)
- gecode/kernel/core.cc (Revision: 7332)