38 #ifndef __GECODE_INT_BRANCH_HH__
39 #define __GECODE_INT_BRANCH_HH__
48 namespace Gecode {
namespace Int {
namespace Branch {
216 namespace Gecode {
namespace Int {
namespace Branch {
220 ViewSel<IntView>*
viewselint(Space& home,
const IntVarBranch& ivb);
223 ViewSel<BoolView>*
viewselbool(Space& home,
const IntVarBranch& ivb);
227 namespace Gecode {
namespace Int {
namespace Branch {
371 template<
class View,
bool min>
395 template<
class View,
bool inc>
417 namespace Gecode {
namespace Int {
namespace Branch {
495 namespace Gecode {
namespace Int {
namespace Branch {
527 void print(
const Space& home,
unsigned int a,
View x,
int i,
int n,
528 std::ostream& o)
const;
549 void print(
const Space& home,
unsigned int a,
View x,
int i,
int n,
550 std::ostream& o)
const;
571 void print(
const Space& home,
unsigned int a,
View x,
int i,
int n,
572 std::ostream& o)
const;
593 void print(
const Space& home,
unsigned int a,
View x,
int i,
int n,
594 std::ostream& o)
const;
601 namespace Gecode {
namespace Int {
namespace Branch {
605 ValSelCommitBase<IntView,int>*
610 ValSelCommitBase<BoolView,int>*
615 ValSelCommitBase<IntView,int>*
620 ValSelCommitBase<BoolView,int>*
625 namespace Gecode {
namespace Int {
namespace Branch {
631 template<
int n,
bool min>
661 std::ostream& o)
const;
int val(const Space &home, View x, int i)
Return value of view x at position i.
static BrancherHandle post(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], BranchFilter bf, IntVarValPrint vvp)
Constructor for creation.
double operator()(const Space &home, View x, int i)
Return size over activity as merit for view x at position i.
BranchFilter bf
Branch filter function.
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
No-good literal for less or equal.
ValSelRnd(Space &home, const ValBranch &vb)
Constructor for initialization.
void dispose(Space &home)
Delete value selection.
ValCommitEq(Space &home, const ValBranch &vb)
Constructor for initialization.
No-good literal for greater or equal.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
MeritMin(Space &home, const VarBranch &vb)
Constructor for initialization.
Value selection class for nearest value.
Generic brancher by view selection.
Activity activity
Activity information.
int val(const Space &home, View x, int i)
Return value of view x at position i.
MeritMax(Space &home, const VarBranch &vb)
Constructor for initialization.
NqNGL(Space &home, View x, int n)
Constructor for creation.
Rnd r
The used random number generator.
Status
The status of a no-good literal.
int ModEvent
Type for modification events.
MeritAFCSize(Space &home, const VarBranch &vb)
Constructor for initialization.
unsigned int operator()(const Space &home, View x, int i)
Return size as merit for view x at position i.
Base-class for merit class.
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.
Merit class for size over degree.
Merit class for size over activity.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
ViewSel< IntView > * viewselint(Space &home, const IntVarBranch &ivb)
Return view selectors for integer views.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
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 commit class for less or equal.
No-good literal for equality.
virtual NGL * ngl(Space &home, const Choice &c, unsigned int a) const
Create no-good literal for choice c and alternative a.
ValSelMed(Space &home, const ValBranch &vb)
Constructor for initialization.
Brancher by view and values selection
Base-class for both propagators and branchers.
IntSharedArray c
The used values.
Value commit class for greater.
Value selection class for mimimum of view.
void dispose(Space &home)
Dispose view selection.
Value selection class for average of view.
Value selection class for random value of view.
Base class for value commit.
Gecode::FloatVal c(-8, 8)
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Class for AFC (accumulated failure count) management.
ViewValuesBrancher(Space &home, bool shared, ViewValuesBrancher &b)
Constructor for cloning b.
int n
Number of negative literals for node type.
int val(const Space &home, View x, int i)
Return value of view x at position i.
Value selection class for minimum range of integer view.
IntVarValPrint vvp
Print function.
double operator()(const Space &home, View x, int i)
Return size over degree as merit for view x at position i.
Value selection class for maximum of view.
ViewSel< IntView > * vs[n]
View selection objects.
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.
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Merit class for mimimum of integer views.
virtual Actor * copy(Space &home, bool share)
Perform cloning.
EqNGL(Space &home, View x, int n)
Constructor for creation.
ViewSel< BoolView > * viewselbool(Space &home, const IntVarBranch &ivb)
Return view selectors for Boolean views.
void dispose(Space &home)
Delete value selection.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
ValSelRangeMin(Space &home, const ValBranch &vb)
Constructor for initialization.
virtual NGL * copy(Space &home, bool share)
Create copy.
double operator()(const Space &home, View x, int i)
Return size over AFC as merit for view x at position i.
Merit class for minimum regret.
Value commit class for greater or equal.
virtual NGL * copy(Space &home, bool share)
Create copy.
int val(const Space &home, View x, int i)
Return value of view x at position i.
ValSelMin(Space &home, const ValBranch &vb)
Constructor for initialization.
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
virtual const Choice * choice(Space &home)
Return choice.
MeritActivitySize(Space &home, const VarBranch &vb)
Constructor for initialization.
Merit class for size over afc.
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.
MeritDegreeSize(Space &home, const VarBranch &vb)
Constructor for initialization.
No-good literal for disequality.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
ValCommitLq(Space &home, const ValBranch &vb)
Constructor for initialization.
GqNGL(Space &home, View x, int n)
Constructor for creation.
virtual void print(const Space &home, const Choice &c, unsigned int a, std::ostream &o) const
Print branch for choice c and alternative a.
MeritRegretMax(Space &home, const VarBranch &vb)
Constructor for initialization.
Value commit class for equality.
Integer view for integer variables.
int val(const Space &home, View x, int i)
Return value of view x at position i.
virtual NGL * copy(Space &home, bool share)
Create copy.
Value branching information.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
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.
Variable branching information.
Node * x
Pointer to corresponding Boolean expression node.
ValSelRangeMax(Space &home, const ValBranch &vb)
Constructor for initialization.
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.
IntSharedArray c
The used values.
Value selection class for median of view.
ValSelCommitBase< IntView, int > * valselcommitint(Space &home, int n, const IntValBranch &ivb)
Return value and commit for integer views.
Choice for performing commit
int val(const Space &home, IntView x, int i)
Return value of integer view x at position i.
void dispose(Space &home)
Delete value selection.
ValSelNearMinMax(Space &home, const ValBranch &vb)
Constructor for initialization.
ValSelNearIncDec(Space &home, const ValBranch &vb)
Constructor for initialization.
LqNGL(Space &home, View x, int n)
Constructor for creation.
int operator()(const Space &home, View x, int i)
Return maximum as merit for view x at position i.
void(* IntVarValPrint)(const Space &home, const BrancherHandle &bh, unsigned int a, IntVar x, int i, const int &n, std::ostream &o)
Function type for printing branching alternatives for integer variables.
unsigned int operator()(const Space &home, View x, int i)
Return maximum regret as merit for view x at position i.
ValSelCommitBase< BoolView, int > * valselcommitbool(Space &home, int n, const IntValBranch &ivb)
Return value and commit for Boolean views.
Merit class for maximum regret.
int val(const Space &home, View x, int i)
Return value of view x at position i.
View-value no-good literal.
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
ValCommitGq(Space &home, const ValBranch &vb)
Constructor for initialization.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Value selection class for nearest value.
void dispose(Space &home)
Dispose view selection.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
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.
unsigned int operator()(const Space &home, View x, int i)
Return minimum regret as merit for view x at position i.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Class for activity management.
#define GECODE_INT_EXPORT
Value selection class for maximum range of integer view.
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.
ValSelMax(Space &home, const ValBranch &vb)
Constructor for initialization.
ValSelAvg(Space &home, const ValBranch &vb)
Constructor for initialization.
ViewArray< IntView > x
Views to branch on.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Home class for posting propagators
ValCommitGr(Space &home, const ValBranch &vb)
Constructor for initialization.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
MeritSize(Space &home, const VarBranch &vb)
Constructor for initialization.
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int a)
Perform commit for choice c and alternative a.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
int operator()(const Space &home, View x, int i)
Return minimum as merit for view x at position i.
Base class for value selection.
int val(const Space &home, IntView x, int i)
Return value of integer view x at position i.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
MeritRegretMin(Space &home, const VarBranch &vb)
Constructor for initialization.
virtual NGL * copy(Space &home, bool share)
Create copy.
No-good literal recorded during search.