Cutoff generator for the Luby sequence. More...
#include <search.hh>
Public Member Functions | |
CutoffLuby (unsigned long int scale) | |
Constructor. More... | |
virtual unsigned long int | operator() (void) const |
Return the current cutoff value. More... | |
virtual unsigned long int | operator++ (void) |
Increment and return the next cutoff value. More... | |
![]() | |
Cutoff (void) | |
Default constructor. More... | |
virtual | ~Cutoff (void) |
Destructor. More... | |
Static Protected Member Functions | |
static unsigned long int | log (unsigned long int i) |
Compute binary logarithm of i. More... | |
static unsigned long int | luby (unsigned long int i) |
Compute Luby number for step i. More... | |
Protected Attributes | |
unsigned long int | i |
Iteration number. More... | |
unsigned long int | scale |
Scale factor. More... | |
Static Protected Attributes | |
static const unsigned long int | n_start = 63U |
Number of pre-computed luby values. More... | |
static unsigned long int | start [n_start] |
Precomputed luby-values. More... | |
|
inline |
Constructor.
Definition at line 69 of file cutoff.hpp.
|
inlinestaticprotected |
Compute binary logarithm of i.
Definition at line 72 of file cutoff.hpp.
|
inlinestaticprotected |
Compute Luby number for step i.
Definition at line 80 of file cutoff.hpp.
|
virtual |
Return the current cutoff value.
Implements Gecode::Search::Cutoff.
Definition at line 74 of file cutoff.cpp.
|
virtual |
Increment and return the next cutoff value.
Implements Gecode::Search::Cutoff.
Definition at line 78 of file cutoff.cpp.
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |