
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... | |
Public Member Functions inherited from Gecode::Search::Cutoff | |
| 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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Gecode::Search::Cutoff | |
| static void * | operator new (size_t s) |
| Memory management. More... | |
| static void | operator delete (void *p) |
| Free memory allocated from heap. More... | |
| static Cutoff * | constant (unsigned long int scale=1U) |
| Create generator for constant sequence with constant s. More... | |
| static Cutoff * | linear (unsigned long int scale=1U) |
| Create generator for linear sequence scaled by scale. More... | |
| static Cutoff * | geometric (unsigned long int scale=1U, double base=1.5) |
| static Cutoff * | luby (unsigned long int scale=1U) |
| Create generator for luby sequence with scale-factor scale. More... | |
| static Cutoff * | rnd (unsigned int seed, unsigned long int min, unsigned long int max, unsigned long int n) |
| static Cutoff * | append (Cutoff *c1, unsigned long int n, Cutoff *c2) |
| Append cutoff values from c2 after n values from c1. More... | |
| static Cutoff * | merge (Cutoff *c1, Cutoff *c2) |
| Merge cutoff values from c1 with values from c2. More... | |
| static Cutoff * | repeat (Cutoff *c, unsigned long int n) |
| Create generator that repeats n times each cutoff value from c. 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 |