Generated on for Gecode by doxygen 1.17.0
Gecode::Search::Par::Slave< Collect > Class Template Reference

Runnable slave of a portfolio master. More...

#include <gecode/search/par/pbs.hh>

Classes

class  Completion
 Completion event for the current run. More...

Public Member Functions

 Slave (PBS< Collect > *m, Engine *s, Stop *so)
 Initialize with master m, slave s, and its stop object so.
Statistics statistics (void) const
 Return statistics of slave.
bool stopped (void) const
 Check whether slave has been stopped.
bool limited (void) const
 Check whether slave stopped at a local limit.
virtual Support::Terminator * terminator (void) const
 Return the completion terminator.
void wait (void)
 Wait for the slave to complete its current run.
void wake (void)
 Wake a paused slave so that it can observe the portfolio stop.
void constrain (const Space &b)
 Constrain with better solution b.
virtual void run (void)
 Perform one run.
virtual ~Slave (void)
 Delete slave.
Public Member Functions inherited from Gecode::Support::Runnable
 Runnable (bool d=true)
 Initialize, d defines whether object is deleted when terminated.
void todelete (bool d)
 Set whether to delete upon termination.
bool todelete (void) const
 Return whether to be deleted upon termination.
virtual ~Runnable (void)
 Destructor.

Protected Attributes

Gecode::Search::Par::Slave::Completion completion
PBS< Collect > * master
 The master engine.
Engine * slave
 The slave engine.
Stop * stop
 Stop object.

Additional Inherited Members

Static Public Member Functions inherited from Gecode::Support::Runnable
static void * operator new (size_t s)
 Allocate memory from heap.
static void operator delete (void *p)
 Free memory allocated from heap.

Detailed Description

template<class Collect>
class Gecode::Search::Par::Slave< Collect >

Runnable slave of a portfolio master.

Definition at line 78 of file pbs.hh.

Constructor & Destructor Documentation

◆ Slave()

template<class Collect>
Gecode::Search::Par::Slave< Collect >::Slave ( PBS< Collect > * m,
Engine * s,
Stop * so )
inline

Initialize with master m, slave s, and its stop object so.

Definition at line 154 of file pbs.hpp.

◆ ~Slave()

template<class Collect>
Gecode::Search::Par::Slave< Collect >::~Slave ( void )
virtual

Delete slave.

Definition at line 196 of file pbs.hpp.

Member Function Documentation

◆ statistics()

template<class Collect>
Statistics Gecode::Search::Par::Slave< Collect >::statistics ( void ) const
inline

Return statistics of slave.

Definition at line 158 of file pbs.hpp.

◆ stopped()

template<class Collect>
bool Gecode::Search::Par::Slave< Collect >::stopped ( void ) const
inline

Check whether slave has been stopped.

Definition at line 163 of file pbs.hpp.

◆ limited()

template<class Collect>
bool Gecode::Search::Par::Slave< Collect >::limited ( void ) const
inline

Check whether slave stopped at a local limit.

Definition at line 168 of file pbs.hpp.

◆ terminator()

template<class Collect>
Support::Terminator * Gecode::Search::Par::Slave< Collect >::terminator ( void ) const
inlinevirtual

Return the completion terminator.

Reimplemented from Gecode::Support::Runnable.

Definition at line 177 of file pbs.hpp.

◆ wait()

template<class Collect>
void Gecode::Search::Par::Slave< Collect >::wait ( void )
inline

Wait for the slave to complete its current run.

Definition at line 182 of file pbs.hpp.

◆ wake()

template<class Collect>
void Gecode::Search::Par::Slave< Collect >::wake ( void )
inline

Wake a paused slave so that it can observe the portfolio stop.

Definition at line 187 of file pbs.hpp.

◆ constrain()

template<class Collect>
void Gecode::Search::Par::Slave< Collect >::constrain ( const Space & b)
inline

Constrain with better solution b.

Definition at line 192 of file pbs.hpp.

◆ run()

template<class Collect>
void Gecode::Search::Par::Slave< Collect >::run ( void )
virtual

Perform one run.

Implements Gecode::Support::Runnable.

Definition at line 264 of file pbs.hpp.

Member Data Documentation

◆ completion

template<class Collect>
Gecode::Search::Par::Slave::Completion Gecode::Search::Par::Slave< Collect >::completion
protected

◆ master

template<class Collect>
PBS<Collect>* Gecode::Search::Par::Slave< Collect >::master
protected

The master engine.

Definition at line 94 of file pbs.hh.

◆ slave

template<class Collect>
Engine* Gecode::Search::Par::Slave< Collect >::slave
protected

The slave engine.

Definition at line 96 of file pbs.hh.

◆ stop

template<class Collect>
Stop* Gecode::Search::Par::Slave< Collect >::stop
protected

Stop object.

Definition at line 98 of file pbs.hh.


The documentation for this class was generated from the following files: