Generated on Sat Jul 29 2017 12:41:24 for Gecode by doxygen 1.8.13
Gecode::Driver::CombinedStop Class Reference

Stop object based on nodes, failures, and time. More...

#include <script.hpp>

Public Types

enum  { SR_NODE = 1 << 0, SR_FAIL = 1 << 1, SR_TIME = 1 << 2, SR_INT = 1 << 3 }
 Reason why search has been stopped. More...
 

Public Member Functions

virtual bool stop (const Search::Statistics &s, const Search::Options &o)
 Test whether search must be stopped. More...
 
int reason (const Search::Statistics &s, const Search::Options &o)
 Report reason why search has been stopped. More...
 
 ~CombinedStop (void)
 Destructor. More...
 
- Public Member Functions inherited from Gecode::Search::Stop
 Stop (void)
 Default constructor. More...
 
virtual ~Stop (void)
 Destructor. More...
 

Static Public Member Functions

static Search::Stopcreate (unsigned int node, unsigned int fail, unsigned int time, bool intr)
 Create appropriate stop-object. More...
 
static void interrupt (int)
 Handler for catching Ctrl-C. More...
 
static void installCtrlHandler (bool install, bool force=false)
 Install handler for catching Ctrl-C. More...
 
- Static Public Member Functions inherited from Gecode::Search::Stop
static Stopnode (unsigned long int l)
 Stop if node limit l has been exceeded. More...
 
static Stopfail (unsigned long int l)
 Stop if failure limit l has been exceeded. More...
 
static Stoptime (unsigned long int l)
 Stop if time limit l (in milliseconds) has been exceeded. More...
 
- Static Public Member Functions inherited from Gecode::HeapAllocated
static void * operator new (size_t s)
 Memory management. More...
 
static void operator delete (void *p)
 Free memory allocated from heap. More...
 

Detailed Description

Stop object based on nodes, failures, and time.

Definition at line 54 of file script.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Reason why search has been stopped.

Enumerator
SR_NODE 

Node limit reached.

SR_FAIL 

Fail limit reached.

SR_TIME 

Time limit reached.

SR_INT 

Interrupted by user.

Definition at line 70 of file script.hpp.

Constructor & Destructor Documentation

◆ ~CombinedStop()

Gecode::Driver::CombinedStop::~CombinedStop ( void  )
inline

Destructor.

Definition at line 130 of file script.hpp.

Member Function Documentation

◆ stop()

virtual bool Gecode::Driver::CombinedStop::stop ( const Search::Statistics s,
const Search::Options o 
)
inlinevirtual

Test whether search must be stopped.

Implements Gecode::Search::Stop.

Definition at line 77 of file script.hpp.

◆ reason()

int Gecode::Driver::CombinedStop::reason ( const Search::Statistics s,
const Search::Options o 
)
inline

Report reason why search has been stopped.

Definition at line 85 of file script.hpp.

◆ create()

static Search::Stop* Gecode::Driver::CombinedStop::create ( unsigned int  node,
unsigned int  fail,
unsigned int  time,
bool  intr 
)
inlinestatic

Create appropriate stop-object.

Definition at line 94 of file script.hpp.

◆ interrupt()

static void Gecode::Driver::CombinedStop::interrupt ( int  )
inlinestatic

Handler for catching Ctrl-C.

Definition at line 114 of file script.hpp.

◆ installCtrlHandler()

static void Gecode::Driver::CombinedStop::installCtrlHandler ( bool  install,
bool  force = false 
)
inlinestatic

Install handler for catching Ctrl-C.

Definition at line 120 of file script.hpp.


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