Go to the documentation of this file.
38 #ifndef __GECODE_INT_BRANCH_HH__
39 #define __GECODE_INT_BRANCH_HH__
48 namespace Gecode {
namespace Int {
namespace Branch {
249 namespace Gecode {
namespace Int {
namespace Branch {
253 ViewSel<IntView>*
viewsel(Space& home,
const IntVarBranch& ivb);
256 ViewSel<BoolView>*
viewsel(Space& home,
const BoolVarBranch& bvb);
260 namespace Gecode {
namespace Int {
namespace Branch {
407 namespace Gecode {
namespace Int {
namespace Branch {
485 namespace Gecode {
namespace Int {
namespace Branch {
519 std::ostream& o)
const;
542 std::ostream& o)
const;
565 std::ostream& o)
const;
588 std::ostream& o)
const;
595 namespace Gecode {
namespace Int {
namespace Branch {
599 ValSelCommitBase<IntView,int>*
604 ValSelCommitBase<BoolView,int>*
609 ValSelCommitBase<IntView,int>*
614 ValSelCommitBase<BoolView,int>*
619 namespace Gecode {
namespace Int {
namespace Branch {
625 template<
int n,
bool min,
class Filter,
class Pr
int>
656 std::ostream& o)
const;
669 template<
int n,
bool min>
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Class for action management.
Post propagator for SetVar x
MeritRegretMax(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
virtual NGL * copy(Space &home, bool share)
Create copy.
ValSelRnd(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
NqNGL(Space &home, View x, int n)
Constructor for creation.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
MeritMax(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
Value selection class for random value of view.
Merit class for CHB over size.
ValSelMed(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
virtual Actor * copy(Space &home, bool share)
Perform cloning.
ModEvent commit(Space &home, unsigned int a, View x, int i, int n)
Commit view x at position i to value n for alternative a.
ViewSel< IntView > * viewsel(Space &home, const IntVarBranch &ivb)
Return view selectors for integer views.
MeritCHBSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
Value commit class for greater.
Class for CHB management.
Base class for value selection.
Gecode::IntArgs i(4, 1, 2, 3, 4)
ValCommitLq(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
Value selection class for maximum of view.
ValSelAvg(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
ViewArray< IntView > x
Views to branch on.
Base class for value commit.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
virtual NGL * copy(Space &home, bool share)
Create copy.
double operator()(const Space &home, View x, int i)
Return action over size as merit for view x at position i.
Base-class for both propagators and branchers.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
EqNGL(Space &home, View x, int n)
Constructor for creation.
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Value commit class for equality.
Brancher by view and values selection
int val(const Space &home, View x, int i)
Return value of view x at position i.
double operator()(const Space &home, View x, int i)
Return degree over size as merit for view x at position i.
int val(const Space &home, View x, int i)
Return value of view x at position i.
void print(const Space &home, unsigned int a, View x, int i, int n, std::ostream &o) const
Print on o the alternative with view x at position i and value n.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Rnd r
The used random number generator.
MeritSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
No-good literal for less or equal.
ModEvent commit(Space &home, unsigned int a, View x, int i, int n)
Commit view x at position i to value n for alternative a.
double operator()(const Space &home, View x, int i)
Return AFC over size as merit for view x at position i.
Variable branching information.
Gecode toplevel namespace
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Value commit class for greater or equal.
No-good literal for greater or equal.
int operator()(const Space &home, View x, int i)
Return maximum as merit for view x at position i.
Generic brancher by view selection.
Value selection class for maximum range of integer view.
IntPropLevel ba(IntPropLevel ipl)
Extract basic or advanced from propagation level.
MeritActionSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
virtual NGL * copy(Space &home, bool share)
Create copy.
void print(const Space &home, unsigned int a, View x, int i, int n, std::ostream &o) const
Print on o the alternative with view x at position i and value n.
ViewSel< IntView > * vs[n]
View selection objects.
void dispose(Space &home)
Delete value selection.
double operator()(const Space &home, View x, int i)
Return size over action as merit for view x at position i.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Value selection class for median of view.
int operator()(const Space &home, View x, int i)
Return minimum as merit for view x at position i.
#define GECODE_INT_EXPORT
ValCommitGq(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
ValCommitEq(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
Home class for posting propagators
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
Merit class for AFC over size.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
Base-class for merit class.
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Merit class for minimum regret.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
void print(const Space &home, unsigned int a, View x, int i, int n, std::ostream &o) const
Print on o the alternative with view x at position i and value n.
Value branching information.
MeritRegretMin(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
unsigned int operator()(const Space &home, View x, int i)
Return size as merit for view x at position i.
No-good literal for equality.
View-value no-good literal.
LqNGL(Space &home, View x, int n)
Constructor for creation.
virtual size_t dispose(Space &home)
Delete brancher and return its size.
void dispose(Space &home)
Dispose view selection.
GqNGL(Space &home, View x, int n)
Constructor for creation.
virtual const Choice * choice(Space &home)
Return choice.
ValSelMin(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Merit class for mimimum of integer views.
Action action
Action information.
int ModEvent
Type for modification events.
Value commit class for less or equal.
Value selection class for average of view.
void print(const Space &home, unsigned int a, View x, int i, int n, std::ostream &o) const
Print on o the alternative with view x at position i and value n.
ModEvent commit(Space &home, unsigned int a, View x, int i, int n)
Commit view x at position i to value n for alternative a.
void dispose(Space &home)
Dispose view selection.
ValSelMax(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
Class for AFC (accumulated failure count) management.
int val(const Space &home, IntView x, int i)
Return value of integer view x at position i.
Merit class for maximum regret.
static void post(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], IntBranchFilter bf, IntVarValPrint vvp)
Post function for creation.
bool shared(const IntSet &, VX)
virtual NGL * copy(Space &home, bool share)
Create copy.
unsigned int operator()(const Space &home, View x, int i)
Return maximum regret as merit for view x at position i.
Integer view for integer variables.
MeritMin(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
virtual void print(const Space &home, const Choice &c, unsigned int a, std::ostream &o) const
Print branch for choice c and alternative a.
std::function< bool(const Space &home, IntVar x, int i)> IntBranchFilter
Branch filter function type for integer variables.
int val(const Space &home, View x, int i)
Return value of view x at position i.
ModEvent commit(Space &home, unsigned int a, View x, int i, int n)
Commit view x at position i to value n for alternative a.
void postviewvaluesbrancher(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], IntBranchFilter bf, IntVarValPrint vvp)
Post brancher for view and values.
unsigned int operator()(const Space &home, View x, int i)
Return minimum regret as merit for view x at position i.
ValSelRangeMax(Space &home, const ValBranch< IntVar > &vb)
Constructor for initialization.
Gecode::FloatVal c(-8, 8)
ViewValuesBrancher(Space &home, bool shared, ViewValuesBrancher &b)
Constructor for cloning b.
No-good literal recorded during search.
No-good literal for disequality.
virtual NGL * ngl(Space &home, const Choice &c, unsigned int a) const
Create no-good literal for choice c and alternative a.
int n
Number of negative literals for node type.
int val(const Space &home, IntView x, int i)
Return value of integer view x at position i.
Status
The status of a no-good literal.
Choice for performing commit
ValSelCommitBase< IntView, int > * valselcommit(Space &home, const IntValBranch &ivb)
Return value and commit for integer views.
void dispose(Space &home)
Dispose view selection.
Value selection class for minimum range of integer view.
int val(const Space &home, View x, int i)
Return value of view x at position i.
int val(const Space &home, View x, int i)
Return value of view x at position i.
Value selection class for mimimum of view.
ValCommitGr(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Merit class for action over size.
MeritDegreeSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int a)
Perform commit for choice c and alternative a.
std::function< void(const Space &home, const Brancher &b, unsigned int a, IntVar x, int i, const int &n, std::ostream &o)> IntVarValPrint
Function type for printing branching alternatives for integer variables.
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
Merit class for degree over size.
MeritAFCSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
ValSelRangeMin(Space &home, const ValBranch< IntVar > &vb)
Constructor for initialization.