Gecode::ViewValBrancher< View, n, Val, a > Class Template Reference
[Generic brancher based on view and value selection]
Generic brancher by view and value selection. More...
#include <brancher-view-val.hpp>
Public Member Functions | |
virtual const Choice * | choice (Space &home) |
Return choice. | |
virtual const Choice * | choice (const Space &home, Archive &e) |
Return choice. | |
virtual ExecStatus | commit (Space &home, const Choice &c, unsigned int b) |
Perform commit for choice c and alternative b. | |
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. | |
virtual Actor * | copy (Space &home, bool share) |
Perform cloning. | |
virtual size_t | dispose (Space &home) |
Delete brancher and return its size. | |
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. | |
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. | |
Protected Member Functions | |
ViewValBrancher (Space &home, bool share, ViewValBrancher &b) | |
Constructor for cloning b. | |
ViewValBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter bf, VarValPrint vvp) | |
Constructor for creation. | |
Protected Attributes | |
ValSelCommitBase< View, Val > * | vsc |
Value selection and commit object. | |
VarValPrint | vvp |
Print function. |
Detailed Description
template<class View, int n, class Val, unsigned int a>
class Gecode::ViewValBrancher< View, n, Val, a >
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.
Member Typedef Documentation
typedef void(* Gecode::ViewValBrancher< View, n, Val, a >::VarValPrint)(const Space &home, const BrancherHandle &bh, unsigned int b, typename View::VarType x, int i, const Val &m, std::ostream &o) [protected] |
Function type for printing variable and value selection.
Reimplemented in Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >, and Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >.
Definition at line 103 of file brancher-view-val.hpp.
Constructor & Destructor Documentation
Gecode::ViewValBrancher< View, n, Val, a >::ViewValBrancher | ( | Space & | home, | |
bool | share, | |||
ViewValBrancher< View, n, Val, a > & | b | |||
) | [inline, protected] |
Constructor for cloning b.
Definition at line 249 of file brancher-view-val.hpp.
Gecode::ViewValBrancher< View, n, Val, a >::ViewValBrancher | ( | Home | home, | |
ViewArray< View > & | x, | |||
ViewSel< View > * | vs[n], | |||
ValSelCommitBase< View, Val > * | vsc, | |||
BranchFilter | bf, | |||
VarValPrint | vvp | |||
) | [inline, protected] |
Constructor for creation.
Definition at line 225 of file brancher-view-val.hpp.
Member Function Documentation
const Choice * Gecode::ViewValBrancher< View, n, Val, a >::choice | ( | Space & | home | ) | [inline, 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.
const Choice * Gecode::ViewValBrancher< View, n, Val, a >::choice | ( | const Space & | home, | |
Archive & | e | |||
) | [inline, 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.
ExecStatus Gecode::ViewValBrancher< View, n, Val, a >::commit | ( | Space & | home, | |
const Choice & | c, | |||
unsigned int | b | |||
) | [inline, 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.
NGL * Gecode::ViewValBrancher< View, n, Val, a >::ngl | ( | Space & | home, | |
const Choice & | c, | |||
unsigned int | b | |||
) | const [inline, 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.
void Gecode::ViewValBrancher< View, n, Val, a >::print | ( | const Space & | home, | |
const Choice & | c, | |||
unsigned int | b, | |||
std::ostream & | o | |||
) | const [inline, 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.
Actor * Gecode::ViewValBrancher< View, n, Val, a >::copy | ( | Space & | home, | |
bool | share | |||
) | [inline, 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.
size_t Gecode::ViewValBrancher< View, n, Val, a >::dispose | ( | Space & | home | ) | [inline, virtual] |
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.
BrancherHandle Gecode::ViewValBrancher< View, n, Val, a >::post | ( | Home | home, | |
ViewArray< View > & | x, | |||
ViewSel< View > * | vs[n], | |||
ValSelCommitBase< View, Val > * | vsc, | |||
BranchFilter | bf, | |||
VarValPrint | vvp | |||
) | [inline, static] |
Brancher post function.
Definition at line 239 of file brancher-view-val.hpp.
Member Data Documentation
ValSelCommitBase<View,Val>* Gecode::ViewValBrancher< View, n, Val, a >::vsc [protected] |
Value selection and commit object.
Definition at line 101 of file brancher-view-val.hpp.
VarValPrint Gecode::ViewValBrancher< View, n, Val, a >::vvp [protected] |
Print function.
Definition at line 109 of file brancher-view-val.hpp.
The documentation for this class was generated from the following file:
- gecode/kernel/brancher-view-val.hpp (Revision: 14471)