Generated on Wed Jan 24 2018 21:22:26 for Gecode by doxygen 1.8.13
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. More...
 
virtual const Choicechoice (Space &home)
 Return choice. More...
 
virtual const Choicechoice (const Space &home, Archive &a)
 Return choice. More...
 
virtual ExecStatus commit (Space &home, const Choice &ch, unsigned int a)
 Perform commit. More...
 
virtual void print (const Space &, const Choice &, unsigned int, std::ostream &o) const
 Print explanation. More...
 
virtual Actorcopy (Space &home, bool share)
 Copy brancher. More...
 
virtual size_t dispose (Space &home)
 Dispose brancher. More...
 
- Public Member Functions inherited from Gecode::Brancher
virtual NGLngl (Space &home, const Choice &c, unsigned int a) const
 Create no-good literal for choice c and alternative a. More...
 
unsigned int id (void) const
 Return brancher id. More...
 
BrancherGroup group (void) const
 Return group brancher belongs to. More...
 
void group (BrancherGroup g)
 Add brancher to group g. More...
 
- Public Member Functions inherited from Gecode::Actor
virtual ~Actor (void)
 To avoid warnings. More...
 

Static Public Member Functions

static void post (Home home, std::function< void(Space &home)> f)
 Post brancher. More...
 
- Static Public Member Functions inherited from Gecode::Actor
static void * operator new (size_t s)
 Not used. More...
 
static void operator delete (void *p)
 Not used. More...
 
static void * operator new (size_t s, Space &home)
 Allocate memory from space. More...
 
static void operator delete (void *p, Space &home)
 No-op for exceptions. More...
 

Protected Member Functions

 FunctionBranch (Home home, std::function< void(Space &home)> f0)
 Construct brancher. More...
 
 FunctionBranch (Space &home, bool share, FunctionBranch &b)
 Copy constructor. More...
 
- Protected Member Functions inherited from Gecode::Brancher
 Brancher (Home home)
 Constructor for creation. More...
 
 Brancher (Space &home, bool share, Brancher &b)
 Constructor for cloning b. More...
 

Protected Attributes

SharedData< std::function< void(Space &home)> > f
 Function to call. More...
 
bool done
 Call function just once. More...
 

Detailed Description

Brancher for calling a function

Definition at line 45 of file branch.cpp.

Constructor & Destructor Documentation

◆ FunctionBranch() [1/2]

Gecode::FunctionBranch::FunctionBranch ( Home  home,
std::function< void(Space &home)>  f0 
)
inlineprotected

Construct brancher.

Definition at line 98 of file branch.cpp.

◆ FunctionBranch() [2/2]

Gecode::FunctionBranch::FunctionBranch ( Space home,
bool  share,
FunctionBranch b 
)
inlineprotected

Copy constructor.

Definition at line 106 of file branch.cpp.

Member Function Documentation

◆ status()

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.

◆ choice() [1/2]

const Choice * Gecode::FunctionBranch::choice ( Space home)
virtual

Return choice.

Implements Gecode::Brancher.

Definition at line 115 of file branch.cpp.

◆ choice() [2/2]

const Choice * Gecode::FunctionBranch::choice ( const Space home,
Archive a 
)
virtual

Return choice.

Implements Gecode::Brancher.

Definition at line 120 of file branch.cpp.

◆ commit()

ExecStatus Gecode::FunctionBranch::commit ( Space home,
const Choice ch,
unsigned int  a 
)
virtual

Perform commit.

Implements Gecode::Brancher.

Definition at line 124 of file branch.cpp.

◆ print()

void Gecode::FunctionBranch::print ( const Space ,
const Choice ,
unsigned int  ,
std::ostream &  o 
) const
virtual

Print explanation.

Reimplemented from Gecode::Brancher.

Definition at line 131 of file branch.cpp.

◆ copy()

Actor * Gecode::FunctionBranch::copy ( Space home,
bool  share 
)
virtual

Copy brancher.

Implements Gecode::Actor.

Definition at line 136 of file branch.cpp.

◆ post()

void Gecode::FunctionBranch::post ( Home  home,
std::function< void(Space &home)>  f 
)
inlinestatic

Post brancher.

Definition at line 140 of file branch.cpp.

◆ dispose()

size_t Gecode::FunctionBranch::dispose ( Space home)
virtual

Dispose brancher.

Reimplemented from Gecode::Actor.

Definition at line 146 of file branch.cpp.

Member Data Documentation

◆ f

SharedData<std::function<void(Space& home)> > Gecode::FunctionBranch::f
protected

Function to call.

Definition at line 58 of file branch.cpp.

◆ done

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: