Generic brancher by view and value selection. More...
#include <brancher-view-val.hpp>
Public Member Functions | |
virtual const Choice * | choice (Space &home) |
Return choice. More... | |
virtual const Choice * | choice (const Space &home, Archive &e) |
Return choice. More... | |
virtual ExecStatus | commit (Space &home, const Choice &c, unsigned int b) |
Perform commit for choice c and alternative b. More... | |
virtual NGL * | ngl (Space &home, const Choice &c, unsigned int b) const |
Create no-good literal for choice c and alternative b. More... | |
virtual void | print (const Space &home, const Choice &c, unsigned int b, std::ostream &o) const |
Print branch for choice c and alternative b. More... | |
virtual Actor * | copy (Space &home, bool share) |
Perform cloning. More... | |
virtual size_t | dispose (Space &home) |
Delete brancher and return its size. More... | |
![]() | |
virtual bool | status (const Space &home) const |
Check status of brancher, return true if alternatives left. More... | |
![]() | |
unsigned int | id (void) const |
Return unsigned brancher id. More... | |
![]() |
Static Public Member Functions | |
static BrancherHandle | post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter bf, VarValPrint vvp) |
Brancher post function. More... | |
![]() | |
static void * | operator new (size_t s, Space &home) |
Allocate memory from space. More... | |
static void | operator delete (void *p, Space &home) |
No-op for exceptions. More... | |
Protected Types | |
typedef void(* | VarValPrint) (const Space &home, const BrancherHandle &bh, unsigned int b, typename View::VarType x, int i, const Val &m, std::ostream &o) |
Function type for printing variable and value selection. More... | |
![]() | |
typedef BranchTraits< typename View::VarType >::Filter | BranchFilter |
The branch filter that corresponds to the var type. More... | |
Protected Member Functions | |
ViewValBrancher (Space &home, bool share, ViewValBrancher &b) | |
Constructor for cloning b. More... | |
ViewValBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter bf, VarValPrint vvp) | |
Constructor for creation. More... | |
![]() | |
Pos | pos (Space &home) |
Return position information. More... | |
View | view (const Pos &p) const |
Return view according to position information p. More... | |
ViewBrancher (Space &home, bool shared, ViewBrancher< View, n > &b) | |
Constructor for cloning b. More... | |
ViewBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], BranchFilter bf) | |
Constructor for creation. More... | |
![]() | |
Brancher (Home home) | |
Constructor for creation. More... | |
Brancher (Space &home, bool share, Brancher &b) | |
Constructor for cloning b. More... | |
Protected Attributes | |
ValSelCommitBase< View, Val > * | vsc |
Value selection and commit object. More... | |
VarValPrint | vvp |
Print function. More... | |
![]() | |
ViewArray< View > | x |
Views to branch on. More... | |
int | start |
Unassigned views start at x[start]. More... | |
ViewSel< View > * | vs [n] |
View selection objects. More... | |
BranchFilter | bf |
Branch filter function. More... | |
Generic brancher by view and value selection.
Implements view-based branching for an array of views (of type View) and value (of type Val).
Definition at line 95 of file brancher-view-val.hpp.
|
protected |
Function type for printing variable and value selection.
Definition at line 103 of file brancher-view-val.hpp.
|
inlineprotected |
Constructor for cloning b.
Definition at line 249 of file brancher-view-val.hpp.
|
inlineprotected |
Constructor for creation.
Definition at line 225 of file brancher-view-val.hpp.
|
virtual |
Return choice.
Implements Gecode::Brancher.
Reimplemented in Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >, and Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >.
Definition at line 261 of file brancher-view-val.hpp.
|
virtual |
Return choice.
Implements Gecode::Brancher.
Reimplemented in Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >.
Definition at line 269 of file brancher-view-val.hpp.
|
virtual |
Perform commit for choice c and alternative b.
Implements Gecode::Brancher.
Reimplemented in Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >, and Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >.
Definition at line 279 of file brancher-view-val.hpp.
|
virtual |
Create no-good literal for choice c and alternative b.
Reimplemented from Gecode::Brancher.
Definition at line 292 of file brancher-view-val.hpp.
|
virtual |
Print branch for choice c and alternative b.
Prints an explanation of the alternative b of choice c on the stream o.
Reimplemented from Gecode::Brancher.
Definition at line 302 of file brancher-view-val.hpp.
|
virtual |
Perform cloning.
Implements Gecode::Actor.
Reimplemented in Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >, and Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >.
Definition at line 255 of file brancher-view-val.hpp.
|
inlinevirtual |
Delete brancher and return its size.
Reimplemented from Gecode::ViewBrancher< View, n >.
Reimplemented in Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >.
Definition at line 316 of file brancher-view-val.hpp.
|
inlinestatic |
Brancher post function.
Definition at line 239 of file brancher-view-val.hpp.
|
protected |
Value selection and commit object.
Definition at line 101 of file brancher-view-val.hpp.
|
protected |
Print function.
Definition at line 109 of file brancher-view-val.hpp.