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 {
528 std::ostream& o)
const;
550 std::ostream& o)
const;
572 std::ostream& o)
const;
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;
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.
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.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
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.
MeritMin(Space &home, const VarBranch &vb)
Constructor for initialization.
Value selection class for nearest value.
Generic brancher by view selection.
Activity activity
Activity information.
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.
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.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
struct Gecode::@511::NNF::@54::@55 b
For binary nodes (and, or, eqv)
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.
ViewSel< IntView > * viewselint(Space &home, const IntVarBranch &ivb)
Return view selectors for integer views.
Value commit class for less or equal.
No-good literal for equality.
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)
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.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
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.
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.
ValSelRangeMin(Space &home, const ValBranch &vb)
Constructor for initialization.
virtual NGL * ngl(Space &home, const Choice &c, unsigned int a) const
Create no-good literal for choice c and alternative a.
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.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
virtual NGL * copy(Space &home, bool share)
Create copy.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
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.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
struct Gecode::@511::NNF::@54::@56 a
For atomic nodes.
MeritDegreeSize(Space &home, const VarBranch &vb)
Constructor for initialization.
No-good literal for disequality.
ValCommitLq(Space &home, const ValBranch &vb)
Constructor for initialization.
GqNGL(Space &home, View x, int n)
Constructor for creation.
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.
MeritRegretMax(Space &home, const VarBranch &vb)
Constructor for initialization.
Value commit class for equality.
Integer view for integer variables.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
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.
virtual NGL * copy(Space &home, bool share)
Create copy.
Value branching information.
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.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Gecode toplevel namespace
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
unsigned int operator()(const Space &home, View x, int i)
Return minimum regret as merit for view x at position i.
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.
virtual void print(const Space &home, const Choice &c, unsigned int a, std::ostream &o) const
Print branch for choice c and alternative a.
ValSelAvg(Space &home, const ValBranch &vb)
Constructor for initialization.
ViewArray< IntView > x
Views to branch on.
Home class for posting propagators
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
ValCommitGr(Space &home, const ValBranch &vb)
Constructor for initialization.
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.
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.
MeritRegretMin(Space &home, const VarBranch &vb)
Constructor for initialization.
virtual NGL * copy(Space &home, bool share)
Create copy.
No-good literal recorded during search.