open.hpp
Go to the documentation of this file.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
Definition core.hpp:3373
Standard view/value selectors over the materialized prefix.
Definition open.hpp:43
int value(const Choice &c, unsigned int a) const
Definition open.hpp:126
static const Choice * value_choice(const Brancher &, int, BoolView)
Definition open.hpp:120
OpenListBrancher(Space &home, OpenListBrancher &b)
Definition open.hpp:71
virtual void print(const Space &home, const Choice &c, unsigned int a, std::ostream &o) const
Print branch for choice c and alternative a.
Definition open.hpp:212
virtual const Choice * choice(const Space &, Archive &e)
Return choice from e.
Definition open.hpp:158
static const Choice * value_choice(const Brancher &b, int i, IntView x)
Definition open.hpp:115
virtual NGL * ngl(Space &home, const Choice &c, unsigned int a) const
Create no-good literal for choice c and alternative a.
Definition open.hpp:196
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int a)
Commit for choice c and alternative a.
Definition open.hpp:172
SharedData< VarValPrint< Var, int > > printer
Definition open.hpp:51
virtual bool status(const Space &home) const
Check status of brancher, return true if alternatives left.
Definition open.hpp:134
ValSelCommitBase< View, int > * vsc
Binary value selector, or null for one alternative per domain value.
Definition open.hpp:49
int position(Space &home)
Select from a temporary array, keeping positions stable across growth.
Definition open.hpp:93
OpenListBrancher(Home home, OpenViewList< View > list0, ViewSel< View > *vs0[n], ValSelCommitBase< View, int > *vsc0, bool values_min0, bool select_first0, BranchFilter< Var > bf, VarValPrint< Var, int > vvp)
Definition open.hpp:57
bool values_min
Whether enumerated domain values are tried in increasing order.
Definition open.hpp:53
static void post(Home home, OpenViewList< View > list, VarBranch vars[n], ValSelCommitBase< View, int > *vsc, bool values_min, BranchFilter< Var > bf, VarValPrint< Var, int > vvp)
Definition open.hpp:257
Choice storing position and values for integer views
Definition view-values.hpp:37
int val(unsigned int a) const
Return value to branch with for alternative a.
Definition view-values.hpp:69
PosValuesChoice(const Brancher &b, const Pos &p, IntView x)
Initialize choice for brancher b, position p, and view x.
UnknownBranching(const char *l)
Initialize with location l.
void materialize(Space &home, int n)
Require and construct at least the first n positions.
Definition open-var-list.hpp:457
int known_length(void) const
Return the number of constructed positions.
Definition open-var-list.hpp:437
void update(Space &home, OpenViewList< View > &s)
Update during cloning.
Definition open-var-list.hpp:431
PosValChoice(const Brancher &b, unsigned int a, const Pos &p, const Val &n)
Initialize choice for brancher b, number of alternatives a, position p, and value n.
Definition view-val.hpp:159
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
Definition region.hpp:386
virtual NGL * ngl(Space &home, unsigned int a, View x, Val n) const =0
Create no-good literal for choice c and alternative a.
virtual Val val(const Space &home, View x, int i)=0
Return value of view x at position i.
virtual ModEvent commit(Space &home, unsigned int a, View x, int i, Val n)=0
Commit view x at position i to value n for alternative a.
virtual void print(const Space &home, unsigned int a, View x, int i, const Val &n, std::ostream &o) const =0
Print on o branch for alternative a, view x at position i, and value n.
virtual void ties(Space &home, ViewArray< View > &x, int s, int *ties, int &n)=0
Select ties from x starting from s.
virtual int select(Space &home, ViewArray< View > &x, int s)=0
Select a view from x starting from s and return its position.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
Definition core.hpp:4321
Integer branchers.
ViewSel< IntView > * viewsel(Space &home, const IntVarBranch &ivb)
Return view selectors for integer views.
ValSelCommitBase< IntView, int > * open_valselcommit(Home home, IntValBranch vals, bool &values_min)
Select binary branching or enumeration of integer domain values.
Definition open.hpp:299
void post_open_brancher(Home home, OpenViewList< View > list, VarBranch vars[n], ValSelCommitBase< View, int > *vsc, bool values_min, BranchFilter< typename View::VarType > bf, VarValPrint< typename View::VarType, int > vvp)
Choose the native filtered or unfiltered brancher policy.
Definition open.hpp:316
void check_open_selector(IntVarBranch vars, bool open)
Reject fixed-position statistics while new variables can still appear.
Definition open.hpp:272
ValSelCommitBase< IntView, int > * valselcommit(Space &home, const IntValBranch &ivb)
Return value and commit for integer views.
Gecode toplevel namespace
std::function< bool(const Space &home, Var x, int i)> BranchFilter
Function type for branch filter functions.
Definition filter.hpp:40
std::function< void(const Space &home, const Brancher &b, unsigned int a, Var x, int i, const Val &m, std::ostream &o)> VarValPrint
Function type for printing variable and value selection.
Definition print.hpp:40
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
