70 std::ostream& o)
const;
89 std::function<
void(
Space& home)> f0)
121 std::ostream& o)
const {
122 o <<
"FunctionBranch()";
137 f.~SharedData<std::function<void(
Space& home)>>();
139 return sizeof(*this);
Base-class for both propagators and branchers.
virtual size_t dispose(Space &home)
Delete actor and return its size.
Brancher(Home home)
Constructor for creation.
Choice for performing commit
Choice(const Brancher &b, const unsigned int a)
Initialize for particular brancher b and alternatives a.
virtual void archive(Archive &e) const
Archive into e.
Home class for posting propagators
Exception: invalid function
Minimal brancher description storing no information.
virtual void archive(Archive &e) const
Archive into e.
Description(const Brancher &b, unsigned int a)
Initialize description for brancher b, number of alternatives a.
SharedData< std::function< void(Space &home)> > f
Function to call.
virtual ExecStatus commit(Space &home, const Choice &ch, unsigned int a)
Perform commit.
virtual const Choice * choice(Space &home)
Return choice.
virtual bool status(const Space &home) const
Check status of brancher, return true if alternatives left.
bool done
Call function just once.
virtual Actor * copy(Space &home)
Copy brancher.
virtual size_t dispose(Space &home)
Dispose brancher.
virtual void print(const Space &, const Choice &, unsigned int, std::ostream &o) const
Print explanation.
static void post(Home home, std::function< void(Space &home)> f)
Post brancher.
FunctionBranch(Home home, std::function< void(Space &home)> f0)
Construct brancher.
Class for sharing data between spaces.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
bool failed(void) const
Check whether space is failed.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
@ AP_DISPOSE
Actor must always be disposed.
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Branch over x with variable selection vars and value selection vals.
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_FAILED
Execution has resulted in failure.
#define GECODE_VALID_FUNCTION(f)
Assert that a function is valid.