Gecode::FunctionBranch Class Reference
Brancher for calling a function More...
Classes | |
| class | Description |
| Minimal brancher description storing no information. More... | |
Public Member Functions | |
| virtual bool | status (const Space &home) const |
| Check status of brancher, return true if alternatives left. | |
| virtual const Choice * | choice (Space &home) |
| Return choice. | |
| virtual const Choice * | choice (const Space &home, Archive &a) |
| Return choice. | |
| virtual ExecStatus | commit (Space &home, const Choice &ch, unsigned int a) |
| Perform commit. | |
| virtual void | print (const Space &, const Choice &, unsigned int, std::ostream &o) const |
| Print explanation. | |
| virtual Actor * | copy (Space &home, bool share) |
| Copy brancher. | |
| virtual size_t | dispose (Space &home) |
| Dispose brancher. | |
Static Public Member Functions | |
| static void | post (Home home, std::function< void(Space &home)> f) |
| Post brancher. | |
Protected Member Functions | |
| FunctionBranch (Home home, std::function< void(Space &home)> f0) | |
| Construct brancher. | |
| FunctionBranch (Space &home, bool share, FunctionBranch &b) | |
| Copy constructor. | |
Protected Attributes | |
| SharedData< std::function < void(Space &home)> > | f |
| Function to call. | |
| bool | done |
| Call function just once. | |
Detailed Description
Brancher for calling a function
Definition at line 45 of file branch.cpp.
Constructor & Destructor Documentation
| Gecode::FunctionBranch::FunctionBranch | ( | Home | home, | |
| std::function< void(Space &home)> | f0 | |||
| ) | [inline, protected] |
Construct brancher.
Definition at line 98 of file branch.cpp.
| Gecode::FunctionBranch::FunctionBranch | ( | Space & | home, | |
| bool | share, | |||
| FunctionBranch & | b | |||
| ) | [inline, protected] |
Copy constructor.
Definition at line 106 of file branch.cpp.
Member Function Documentation
| bool Gecode::FunctionBranch::status | ( | const Space & | home | ) | const [virtual] |
Check status of brancher, return true if alternatives left.
Implements Gecode::Brancher.
Definition at line 111 of file branch.cpp.
| ExecStatus Gecode::FunctionBranch::commit | ( | Space & | home, | |
| const Choice & | ch, | |||
| unsigned int | a | |||
| ) | [virtual] |
| void Gecode::FunctionBranch::post | ( | Home | home, | |
| std::function< void(Space &home)> | f | |||
| ) | [inline, static] |
Post brancher.
Definition at line 140 of file branch.cpp.
| size_t Gecode::FunctionBranch::dispose | ( | Space & | home | ) | [virtual] |
Member Data Documentation
SharedData<std::function<void(Space& home)> > Gecode::FunctionBranch::f [protected] |
Function to call.
Definition at line 58 of file branch.cpp.
bool Gecode::FunctionBranch::done [protected] |
Call function just once.
Definition at line 60 of file branch.cpp.
The documentation for this class was generated from the following file:
- gecode/kernel/branch.cpp (Revision: 15541)
