Stop-object based on time
More...
#include <gecode/search.hh>
|
| | TimeStop (double l) |
| | Stop if search exceeds l milliseconds (from creation of this object).
|
| | TimeStop (const TimeStop &s) |
| | Copy constructor.
|
| TimeStop & | operator= (const TimeStop &s) |
| | Assignment operator.
|
| double | limit (void) const |
| | Return current limit in milliseconds.
|
| void | limit (double l) |
| | Set current limit to l milliseconds.
|
| void | reset (void) |
| | Reset time to zero.
|
| virtual bool | stop (const Statistics &s, const Options &o) |
| | Return true if time limit is exceeded.
|
| | Stop (void) |
| | Default constructor.
|
| virtual | ~Stop (void) |
| | Destructor.
|
|
| using | clock = std::chrono::steady_clock |
| using | clock_rep = clock::time_point::rep |
|
| std::atomic< clock_rep > | t0 |
| | Clock representation at the start of timing.
|
| std::atomic< double > | l |
| | Current limit in milliseconds.
|
|
| static Stop * | node (unsigned long long int l) |
| | Stop if node limit l has been exceeded.
|
| static Stop * | fail (unsigned long long int l) |
| | Stop if failure limit l has been exceeded.
|
| static Stop * | time (double l) |
| | Stop if time limit l (in milliseconds) has been exceeded.
|
| static Stop * | restart (unsigned long long int l) |
| | Stop if restart limit l has been exceeded.
|
| static void * | operator new (size_t s) |
| | Memory management.
|
| static void | operator delete (void *p) |
| | Free memory allocated from heap.
|
Stop-object based on time
Definition at line 886 of file search.hh.
◆ clock
◆ clock_rep
◆ TimeStop() [1/2]
| Gecode::Search::TimeStop::TimeStop |
( |
double | l | ) |
|
|
inline |
Stop if search exceeds l milliseconds (from creation of this object).
Definition at line 110 of file stop.hpp.
◆ TimeStop() [2/2]
| Gecode::Search::TimeStop::TimeStop |
( |
const TimeStop & | s | ) |
|
|
inline |
Copy constructor.
Definition at line 113 of file stop.hpp.
◆ operator=()
Assignment operator.
Definition at line 118 of file stop.hpp.
◆ limit() [1/2]
| double Gecode::Search::TimeStop::limit |
( |
void | | ) |
const |
|
inline |
Return current limit in milliseconds.
Definition at line 128 of file stop.hpp.
◆ limit() [2/2]
| void Gecode::Search::TimeStop::limit |
( |
double | l | ) |
|
|
inline |
Set current limit to l milliseconds.
Definition at line 133 of file stop.hpp.
◆ reset()
| void Gecode::Search::TimeStop::reset |
( |
void | | ) |
|
|
inline |
Reset time to zero.
Definition at line 138 of file stop.hpp.
◆ stop()
| virtual bool Gecode::Search::TimeStop::stop |
( |
const Statistics & | s, |
|
|
const Options & | o ) |
|
virtual |
◆ t0
| std::atomic<clock_rep> Gecode::Search::TimeStop::t0 |
|
protected |
Clock representation at the start of timing.
Definition at line 891 of file search.hh.
| std::atomic<double> Gecode::Search::TimeStop::l |
|
protected |
Current limit in milliseconds.
Definition at line 893 of file search.hh.
The documentation for this class was generated from the following files: