Gecode::Search::NodeStop Class Reference
Functionality by programming task » Programming models » Search engines » Stop-objects for stopping search

Stop-object based on number of nodes More...

`#include <search.hh>`

## Public Member Functions

| NodeStop (unsigned long int l)
| Stop if node limit l is exceeded.
unsigned long int | limit (void) const
| Return current limit.
void | limit (unsigned long int l)
| Set current limit to l nodes.
virtual bool | stop (const Statistics &s, const Options &o)
| Return true if node limit is exceeded.
| Stop (void)
| Default constructor.
virtual | ~Stop (void)
| Destructor.

## Protected Attributes

unsigned long int | l
| Node limit.

## Additional Inherited Members

static Stop * | node (unsigned long int l)
| Stop if node limit l has been exceeded.
static Stop * | fail (unsigned long int l)
| Stop if failure limit l has been exceeded.
static Stop * | time (unsigned long int l)
| Stop if time limit l (in milliseconds) has been exceeded.
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

Stop-object based on number of nodes

The number of nodes reported (by the statistics) is the number since the engine started exploration. It is not the number since the last stop!

Definition at line 829 of file search.hh.

## Constructor & Destructor Documentation

## NodeStop()

Gecode::Search::NodeStop::NodeStop | ( | unsigned long int | l | ) |

inline

Stop if node limit l is exceeded.

Definition at line 52 of file stop.hpp.

## Member Function Documentation

## limit() [1/2]

unsigned long int Gecode::Search::NodeStop::limit | ( | void |  | ) | const

inline

Return current limit.

Definition at line 55 of file stop.hpp.

## limit() [2/2]

void Gecode::Search::NodeStop::limit | ( | unsigned long int | l | ) |

inline

Set current limit to l nodes.

Definition at line 60 of file stop.hpp.

## stop()

bool Gecode::Search::NodeStop::stop | ( | const Statistics & | s,
|  | const Options & | o )

virtual

Return true if node limit is exceeded.

Implements Gecode::Search::Stop.

Definition at line 61 of file stop.cpp.

## Member Data Documentation

## l

unsigned long int Gecode::Search::NodeStop::l

protected

Node limit.

Definition at line 832 of file search.hh.

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

- gecode/search.hh
- gecode/search/stop.cpp
- gecode/search/stop.hpp