Symmetry-breaking brancher with generic view and value selection. More...
#include <ldsb.hh>
Public Member Functions | |
LDSBSetBrancher (Space &home, LDSBSetBrancher &b) | |
Constructor for cloning b. | |
LDSBSetBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp) | |
Constructor for creation. | |
virtual const Choice * | choice (Space &home) |
Return choice. | |
virtual ExecStatus | commit (Space &home, const Choice &c, unsigned int b) |
Perform commit for choice c and alternative b. | |
virtual Actor * | copy (Space &home) |
Perform cloning. | |
template<class View0, int n0, class Val0, unsigned int a0> | |
void | postldsbsetbrancher (Home home, ViewArray< View0 > &x, ViewSel< View0 > *vs[n0], ValSelCommitBase< View0, Val0 > *vsc, SymmetryImp< View0 > **syms, int nsyms, BranchFilter< typename View0::VarType > bf, VarValPrint< typename View0::VarType, Val0 > vvp) |
Post LDSB brancher. | |
void | updatePart1 (Space &home, int choicePos) |
Part one of the update phase. | |
Public Member Functions inherited from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print > | |
virtual const Choice * | choice (const Space &home, Archive &e) |
Return choice. | |
virtual size_t | dispose (Space &home) |
Delete brancher and return its size. | |
Public Member Functions inherited from Gecode::ViewValBrancher< View, n, Val, a, Filter, Print > | |
virtual NGL * | ngl (Space &home, const Choice &c, unsigned int b) const |
Create no-good literal for choice c and alternative b. | |
virtual void | print (const Space &home, const Choice &c, unsigned int b, std::ostream &o) const |
Print branch for choice c and alternative b. | |
Public Member Functions inherited from Gecode::ViewBrancher< View, Filter, n > | |
virtual bool | status (const Space &home) const |
Check status of brancher, return true if alternatives left. | |
unsigned int | id (void) const |
Return brancher id. | |
BrancherGroup | group (void) const |
Return group brancher belongs to. | |
void | group (BrancherGroup g) |
Add brancher to group g. | |
virtual | ~Actor (void) |
To avoid warnings. |
Static Public Member Functions | |
static void | post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **_syms, int _nsyms, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp) |
Brancher post function. | |
Static Public Member Functions inherited from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print > | |
static void | post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp) |
Brancher post function. | |
Static Public Member Functions inherited from Gecode::ViewValBrancher< View, n, Val, a, Filter, Print > | |
static void | post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp) |
Brancher post function. | |
static void * | operator new (size_t s, Space &home) |
Allocate memory from space. | |
static void | operator delete (void *p, Space &home) |
No-op for exceptions. | |
static void * | operator new (size_t s) |
Not used. | |
static void | operator delete (void *p) |
Not used. |
Public Attributes | |
int | _prevPos |
Position of previous variable that was branched on. | |
int | _nNonValueSymmetries |
Number of non-value symmetries. | |
int | _nValueSymmetries |
Number of value symmetries. | |
ValueSymmetryImp< View > ** | _copiedSyms |
Copy of value symmetries from the first node where the current variable was branched on. | |
int | _nCopiedSyms |
Number of copied symmetries. | |
IntSet | _leftBranchValues |
Set of values used on left branches for the current variable. | |
bool | _stable |
Is the state of the brancher "stable"? | |
Public Attributes inherited from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print > | |
SymmetryImp< View > ** | _syms |
Array of symmetry implementations. | |
int | _nsyms |
Number of symmetry implementations. | |
int | _prevPos |
Additional Inherited Members | |
Protected Types inherited from Gecode::ViewValBrancher< View, n, Val, a, Filter, Print > | |
typedef View::VarType | Var |
The corresponding variable. | |
Protected Types inherited from Gecode::ViewBrancher< View, Filter, n > | |
typedef View::VarType | Var |
The corresponding variable. | |
Protected Member Functions inherited from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print > | |
LDSBBrancher (Space &home, LDSBBrancher &b) | |
Constructor for cloning b. | |
LDSBBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp) | |
Constructor for creation. | |
Protected Member Functions inherited from Gecode::ViewValBrancher< View, n, Val, a, Filter, Print > | |
ViewValBrancher (Space &home, ViewValBrancher &b) | |
Constructor for cloning b. | |
ViewValBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp) | |
Constructor for creation. | |
Protected Member Functions inherited from Gecode::ViewBrancher< View, Filter, n > | |
Pos | pos (Space &home) |
Return position information. | |
View | view (const Pos &p) const |
Return view according to position information p. | |
ViewBrancher (Space &home, ViewBrancher< View, Filter, n > &b) | |
Constructor for cloning b. | |
ViewBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], BranchFilter< Var > bf) | |
Constructor for creation. | |
Protected Member Functions inherited from Gecode::Brancher | |
Brancher (Home home) | |
Constructor for creation. | |
Brancher (Space &home, Brancher &b) | |
Constructor for cloning b. | |
Protected Attributes inherited from Gecode::ViewValBrancher< View, n, Val, a, Filter, Print > | |
ValSelCommitBase< View, Val > * | vsc |
Value selection and commit object. | |
p | |
Print function. | |
Protected Attributes inherited from Gecode::ViewBrancher< View, Filter, n > | |
ViewArray< View > | x |
Views to branch on. | |
int | start |
Unassigned views start at x[start]. | |
ViewSel< View > * | vs [n] |
View selection objects. | |
Filter | f |
Filter function. |
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, Filter, Print >::LDSBSetBrancher | ( | Space & | home, |
LDSBSetBrancher< View, n, Val, a, Filter, Print > & | b ) |
Constructor for cloning b.
Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >::LDSBSetBrancher | ( | Home | home, |
ViewArray< View > & | x, | ||
ViewSel< View > * | vs[n], | ||
ValSelCommitBase< View, Val > * | vsc, | ||
SymmetryImp< View > ** | syms, | ||
int | nsyms, | ||
BranchFilter< Var > | bf, | ||
VarValPrint< Var, Val > | vvp ) |
Constructor for creation.
|
virtual |
Return choice.
Reimplemented from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print >.
Definition at line 184 of file brancher.hpp.
|
virtual |
Perform commit for choice c and alternative b.
Reimplemented from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print >.
Definition at line 204 of file brancher.hpp.
|
virtual |
Perform cloning.
Reimplemented from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print >.
Definition at line 249 of file brancher.hpp.
|
inlinestatic |
Brancher post function.
Definition at line 257 of file brancher.hpp.
void Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >::postldsbsetbrancher | ( | Home | home, |
ViewArray< View0 > & | x, | ||
ViewSel< View0 > * | vs[n0], | ||
ValSelCommitBase< View0, Val0 > * | vsc, | ||
SymmetryImp< View0 > ** | syms, | ||
int | nsyms, | ||
BranchFilter< typename View0::VarType > | bf, | ||
VarValPrint< typename View0::VarType, Val0 > | vvp ) |
Post LDSB brancher.
void Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >::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 133 of file brancher.hpp.
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >::_prevPos |
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >::_nNonValueSymmetries |
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >::_nValueSymmetries |
ValueSymmetryImp<View>** Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >::_copiedSyms |
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >::_nCopiedSyms |
IntSet Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >::_leftBranchValues |
bool Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >::_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).