38 namespace Gecode {
namespace Kernel {
70 std::ostream& o)
const;
74 static void post(
Home home, std::function<
void(
Space& home)> f);
89 std::function<
void(
Space& home)> f0)
90 :
Brancher(home), f(f0), done(false) {
97 :
Brancher(home,b), f(b.f), done(b.done) {
121 std::ostream& o)
const {
122 o <<
"FunctionBranch()";
139 return sizeof(*this);
SharedData< std::function< void(Space &home)> > f
Function to call.
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.
virtual void archive(Archive &e) const
Archive into e.
Actor must always be disposed.
static void post(Home home, std::function< void(Space &home)> f)
Post brancher.
virtual void print(const Space &, const Choice &, unsigned int, std::ostream &o) const
Print explanation.
Description(const Brancher &b, unsigned int a)
Initialize description for brancher b, number of alternatives a.
Base-class for both propagators and branchers.
Base-class for branchers.
Execution has resulted in failure.
~SharedData(void)
Destructors.
bool failed(void) const
Check whether space is failed.
virtual const Choice * choice(Space &home)
Return choice.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
Minimal brancher description storing no information.
Exception: invalid function
#define GECODE_VALID_FUNCTION(f)
Assert that a function is valid.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
virtual void archive(Archive &e) const
Archive into e.
Choice for performing commit
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
virtual size_t dispose(Space &home)
Delete actor and return its size.
Class for sharing data between spaces.
virtual ExecStatus commit(Space &home, const Choice &ch, unsigned int a)
Perform commit.
FunctionBranch(Home home, std::function< void(Space &home)> f0)
Construct brancher.
Gecode toplevel namespace
bool done
Call function just once.
Home class for posting propagators
Brancher for calling a function
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.
virtual bool status(const Space &home) const
Check status of brancher, return true if alternatives left.
virtual Actor * copy(Space &home)
Copy brancher.
virtual size_t dispose(Space &home)
Dispose brancher.