Go to the documentation of this file.
53 virtual size_t size(
void)
const;
76 std::ostream& o)
const;
99 std::function<
void(
Space& home)> f0)
108 f.update(home,share,
b.f);
132 std::ostream& o)
const {
133 o <<
"FunctionBranch()";
148 f.~SharedData<std::function<void(
Space& home)>>();
150 return sizeof(*this);
virtual void print(const Space &, const Choice &, unsigned int, std::ostream &o) const
Print explanation.
virtual Actor * copy(Space &home, bool share)
Copy brancher.
Class for sharing data between spaces.
Description(const Brancher &b, unsigned int a)
Initialize description for brancher b, number of alternatives a.
virtual const Choice * choice(Space &home)
Return choice.
virtual ExecStatus commit(Space &home, const Choice &ch, unsigned int a)
Perform commit.
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf, FloatVarValPrint vvp)
Branch over x with variable selection vars and value selection vals.
Base-class for both propagators and branchers.
static void post(Home home, std::function< void(Space &home)> f)
Post brancher.
virtual size_t dispose(Space &home)
Dispose brancher.
FunctionBranch(Home home, std::function< void(Space &home)> f0)
Construct brancher.
#define GECODE_VALID_FUNCTION(f)
Assert that a function is valid.
Gecode toplevel namespace
Minimal brancher description storing no information.
Base-class for branchers.
Home class for posting propagators
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
@ AP_DISPOSE
Actor must always be disposed.
virtual void archive(Archive &e) const
Archive into e.
bool failed(void) const
Check whether space is failed.
SharedData< std::function< void(Space &home)> > f
Function to call.
Exception: invalid function
Brancher for calling a function
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
virtual size_t dispose(Space &home)
Delete actor and return its size.
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
Choice for performing commit
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
@ ES_FAILED
Execution has resulted in failure.
bool done
Call function just once.
virtual size_t size(void) const
Report size occupied.
@ ES_OK
Execution is okay.
virtual void archive(Archive &e) const
Archive into e.
virtual bool status(const Space &home) const
Check status of brancher, return true if alternatives left.