Base class for cutoff generators for restart-based meta engine. More...
#include <search.hh>
Public Member Functions | |
Cutoff (void) | |
Default constructor. More... | |
virtual unsigned long int | operator() (void) const =0 |
Return the current cutoff value. More... | |
virtual unsigned long int | operator++ (void)=0 |
Increment and return the next cutoff value. More... | |
virtual | ~Cutoff (void) |
Destructor. More... | |
Static Public Member Functions | |
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... | |
static void * | operator new (size_t s) |
Allocate memory from heap. More... | |
static void | operator delete (void *p) |
Free memory allocated from heap. More... | |
Base class for cutoff generators for restart-based meta engine.
|
inline |
Default constructor.
Definition at line 209 of file cutoff.hpp.
|
inlinevirtual |
Destructor.
Definition at line 211 of file cutoff.hpp.
|
pure virtual |
Return the current cutoff value.
Implemented in Gecode::Search::CutoffRepeat, Gecode::Search::CutoffMerge, Gecode::Search::CutoffAppend, Gecode::Search::CutoffRandom, Gecode::Search::CutoffGeometric, Gecode::Search::CutoffLuby, Gecode::Search::CutoffLinear, and Gecode::Search::CutoffConstant.
|
pure virtual |
Increment and return the next cutoff value.
Implemented in Gecode::Search::CutoffRepeat, Gecode::Search::CutoffMerge, Gecode::Search::CutoffAppend, Gecode::Search::CutoffRandom, Gecode::Search::CutoffGeometric, Gecode::Search::CutoffLuby, Gecode::Search::CutoffLinear, and Gecode::Search::CutoffConstant.
|
static |
Create generator for constant sequence with constant s.
Definition at line 218 of file cutoff.cpp.
|
static |
Create generator for linear sequence scaled by scale.
Definition at line 222 of file cutoff.cpp.
|
static |
Create generator for geometric sequence scaled by scale using base base
Definition at line 230 of file cutoff.cpp.
|
static |
Create generator for luby sequence with scale-factor scale.
Definition at line 226 of file cutoff.cpp.
|
static |
Create generator for random sequence with seed seed that generates values between min and max with n steps between the extreme values (use 0 for n to get step size 1).
Definition at line 234 of file cutoff.cpp.
Append cutoff values from c2 after n values from c1.
Definition at line 241 of file cutoff.cpp.
Merge cutoff values from c1 with values from c2.
Definition at line 245 of file cutoff.cpp.
Create generator that repeats n times each cutoff value from c.
Definition at line 249 of file cutoff.cpp.
|
inlinestatic |
Allocate memory from heap.
Definition at line 213 of file cutoff.hpp.
|
inlinestatic |
Free memory allocated from heap.
Definition at line 217 of file cutoff.hpp.