Gecode::Search::WorkerToEngine< Worker > Class Template Reference

Virtualize a worker to an engine. More...

`#include <support.hh>`

## Public Member Functions

| WorkerToEngine (Space *s, const Options &o)
| Initialization.
virtual Space * | next (void)
| Return next solution (NULL, if none exists or search has been stopped).
virtual Search::Statistics | statistics (void) const
| Return statistics.
virtual bool | stopped (void) const
| Check whether engine has been stopped.
virtual void | constrain (const Space &b)
| Constrain future solutions to be better than b.
virtual void | reset (Space *s)
| Reset engine to restart at space s.
virtual NoGoods & | nogoods (void)
| Return no-goods.
Public Member Functions inherited from Gecode::Search::Engine
virtual | ~Engine (void)
| Destructor.

## Protected Attributes

Worker | w
| The worker to wrap into an engine.

## Additional Inherited Members

Static Public Member Functions inherited from Gecode::HeapAllocated
static void * | operator new (size_t s)
| Memory management.
static void | operator delete (void *p)
| Free memory allocated from heap.

## Detailed Description

template<class Worker>
class Gecode::Search::WorkerToEngine< Worker >

Virtualize a worker to an engine.

Definition at line 47 of file support.hh.

## Constructor & Destructor Documentation

## WorkerToEngine()

template<class Worker>

Gecode::Search::WorkerToEngine< Worker >::WorkerToEngine | ( | Space * | s,
|  | const Options & | o )

Initialization.

Definition at line 77 of file support.hh.

## Member Function Documentation

## next()

template<class Worker>

Space * Gecode::Search::WorkerToEngine< Worker >::next | ( | void |  | ) |

virtual

Return next solution (NULL, if none exists or search has been stopped).

Implements Gecode::Search::Engine.

Definition at line 81 of file support.hh.

## statistics()

template<class Worker>

Search::Statistics Gecode::Search::WorkerToEngine< Worker >::statistics | ( | void |  | ) | const

virtual

Return statistics.

Implements Gecode::Search::Engine.

Definition at line 86 of file support.hh.

## stopped()

template<class Worker>

bool Gecode::Search::WorkerToEngine< Worker >::stopped | ( | void |  | ) | const

virtual

Check whether engine has been stopped.

Implements Gecode::Search::Engine.

Definition at line 91 of file support.hh.

## constrain()

template<class Worker>

void Gecode::Search::WorkerToEngine< Worker >::constrain | ( | const Space & | b | ) |

virtual

Constrain future solutions to be better than b.

Reimplemented from Gecode::Search::Engine.

Definition at line 101 of file support.hh.

## reset()

template<class Worker>

void Gecode::Search::WorkerToEngine< Worker >::reset | ( | Space * | s | ) |

virtual

Reset engine to restart at space s.

Reimplemented from Gecode::Search::Engine.

Definition at line 96 of file support.hh.

## nogoods()

template<class Worker>

NoGoods & Gecode::Search::WorkerToEngine< Worker >::nogoods | ( | void |  | ) |

virtual

Return no-goods.

Reimplemented from Gecode::Search::Engine.

Definition at line 106 of file support.hh.

## Member Data Documentation

## w

template<class Worker>

Worker Gecode::Search::WorkerToEngine< Worker >::w

protected

The worker to wrap into an engine.

Definition at line 50 of file support.hh.

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

- gecode/search/support.hh