Symmetry-breaking brancher with generic view and value selection. More...
#include <ldsb.hh>
Public Member Functions | |
LDSBSetBrancher (Space &home, bool share, LDSBSetBrancher &b) | |
Constructor for cloning b. More... | |
LDSBSetBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, SetBranchFilter bf) | |
Constructor for creation. More... | |
virtual const Choice * | choice (Space &home) |
Return choice. More... | |
virtual ExecStatus | commit (Space &home, const Choice &c, unsigned int b) |
Perform commit for choice c and alternative b. More... | |
virtual Actor * | copy (Space &home, bool share) |
Perform cloning. More... | |
void | updatePart1 (Space &home, int choicePos) |
Part one of the update phase. More... | |
![]() | |
virtual const Choice * | choice (const Space &home, Archive &e) |
Return choice. More... | |
virtual size_t | dispose (Space &home) |
Delete brancher and return its size. More... | |
Static Public Member Functions | |
static BrancherHandle | post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **_syms, int _nsyms, SetBranchFilter bf) |
Brancher post function. More... | |
![]() | |
static BrancherHandle | post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter bf) |
Brancher post function. More... | |
![]() | |
static BrancherHandle | post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter bf) |
Brancher post function. More... | |
Public Attributes | |
int | _prevPos |
Position of previous variable that was branched on. More... | |
int | _nNonValueSymmetries |
Number of non-value symmetries. More... | |
int | _nValueSymmetries |
Number of value symmetries. More... | |
ValueSymmetryImp< View > ** | _copiedSyms |
Copy of value symmetries from the first node where the current variable was branched on. More... | |
int | _nCopiedSyms |
Number of copied symmetries. More... | |
IntSet | _leftBranchValues |
Set of values used on left branches for the current variable. More... | |
bool | _stable |
Is the state of the brancher "stable"? More... | |
![]() | |
SymmetryImp< View > ** | _syms |
Array of symmetry implementations. More... | |
int | _nsyms |
Number of symmetry implementations. More... | |
int | _prevPos |
Additional Inherited Members | |
![]() | |
typedef BranchTraits< typename View::VarType >::Filter | BranchFilter |
The branch filter that corresponds to the var type. More... | |
![]() | |
LDSBBrancher (Space &home, bool share, LDSBBrancher &b) | |
Constructor for cloning b. More... | |
LDSBBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter bf) | |
Constructor for creation. More... | |
![]() | |
ValSelCommitBase< View, Val > * | vsc |
Value selection and commit object. More... | |
Symmetry-breaking brancher with generic view and value selection.
Implements view-based branching for an array of views (of type View) on set variables and value (of type Val).
Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::LDSBSetBrancher | ( | Space & | home, |
bool | share, | ||
LDSBSetBrancher< View, n, Val, a > & | b | ||
) |
Constructor for cloning b.
Definition at line 33 of file brancher.hpp.
Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::LDSBSetBrancher | ( | Home | home, |
ViewArray< View > & | x, | ||
ViewSel< View > * | vs[n], | ||
ValSelCommitBase< View, Val > * | vsc, | ||
SymmetryImp< View > ** | syms, | ||
int | nsyms, | ||
SetBranchFilter | bf | ||
) |
Constructor for creation.
Definition at line 5 of file brancher.hpp.
|
virtual |
Return choice.
Reimplemented from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >.
Definition at line 142 of file brancher.hpp.
|
virtual |
Perform commit for choice c and alternative b.
Reimplemented from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >.
Definition at line 161 of file brancher.hpp.
|
virtual |
Perform cloning.
Reimplemented from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >.
Definition at line 203 of file brancher.hpp.
|
inlinestatic |
Brancher post function.
Definition at line 210 of file brancher.hpp.
void Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::updatePart1 | ( | Space & | home, |
int | choicePos | ||
) |
Part one of the update phase.
If the branching is at a new variable, restore previously copied value symmetries, do bulk update of values used on left branches for the previous variable, and make fresh copy of resulting value symmetries.
Definition at line 95 of file brancher.hpp.
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_prevPos |
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_nNonValueSymmetries |
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_nValueSymmetries |
ValueSymmetryImp<View>** Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_copiedSyms |
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_nCopiedSyms |
IntSet Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_leftBranchValues |
bool Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_stable |
Is the state of the brancher "stable"?
The brancher is unstable if we are about to run either "choice" or "commit", but "updatePart1" has not been run. After "updatePart1" has been run the brancher is stable, until the second part of the update is done (in commit).