Generated on for Gecode by doxygen 1.17.0

Cutoff generator for the Luby sequence. More...

#include <gecode/search.hh>

Public Member Functions

 CutoffLuby (unsigned long long int scale)
 Constructor.
virtual unsigned long long int operator() (void) const
 Return the current cutoff value.
virtual unsigned long long int operator++ (void)
 Increment and return the next cutoff value.
 Cutoff (void)
 Default constructor.
virtual ~Cutoff (void)
 Destructor.

Static Protected Member Functions

static unsigned long long int log (unsigned long long int i)
 Compute binary logarithm of i.
static unsigned long long int luby (unsigned long long int i)
 Compute Luby number for step i.

Protected Attributes

unsigned long long int i
 Iteration number.
unsigned long long int scale
 Scale factor.

Static Protected Attributes

static const unsigned long long int n_start = 63U
 Number of pre-computed luby values.
static unsigned long int start [n_start]
 Precomputed luby-values.

Additional Inherited Members

static Cutoffconstant (unsigned long long int scale=Config::slice)
 Create generator for constant sequence with constant s.
static Cutofflinear (unsigned long long int scale=Config::slice)
 Create generator for linear sequence scaled by scale.
static Cutoffgeometric (unsigned long long int scale=Config::slice, double base=Config::base)
static Cutoffluby (unsigned long long int scale=Config::slice)
 Create generator for luby sequence with scale-factor scale.
static Cutoffrnd (unsigned int seed, unsigned long long int min, unsigned long long int max, unsigned long long int n)
static Cutoffappend (Cutoff *c1, unsigned long long int n, Cutoff *c2)
 Append cutoff values from c2 after n values from c1.
static Cutoffmerge (Cutoff *c1, Cutoff *c2)
 Merge cutoff values from c1 with values from c2.
static Cutoffrepeat (Cutoff *c, unsigned long long int n)
 Create generator that repeats n times each cutoff value from c.
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

Cutoff generator for the Luby sequence.

Definition at line 566 of file search.hh.

Constructor & Destructor Documentation

◆ CutoffLuby()

Gecode::Search::CutoffLuby::CutoffLuby ( unsigned long long int scale)
inline

Constructor.

Definition at line 57 of file cutoff.hpp.

Member Function Documentation

◆ log()

unsigned long long int Gecode::Search::CutoffLuby::log ( unsigned long long int i)
inlinestaticprotected

Compute binary logarithm of i.

Definition at line 60 of file cutoff.hpp.

◆ luby()

unsigned long long int Gecode::Search::CutoffLuby::luby ( unsigned long long int i)
inlinestaticprotected

Compute Luby number for step i.

Definition at line 68 of file cutoff.hpp.

◆ operator()()

virtual unsigned long long int Gecode::Search::CutoffLuby::operator() ( void ) const
virtual

Return the current cutoff value.

Implements Gecode::Search::Cutoff.

◆ operator++()

virtual unsigned long long int Gecode::Search::CutoffLuby::operator++ ( void )
virtual

Increment and return the next cutoff value.

Implements Gecode::Search::Cutoff.

Member Data Documentation

◆ i

unsigned long long int Gecode::Search::CutoffLuby::i
protected

Iteration number.

Definition at line 569 of file search.hh.

◆ scale

unsigned long long int Gecode::Search::CutoffLuby::scale
protected

Scale factor.

Definition at line 571 of file search.hh.

◆ n_start

const unsigned long long int Gecode::Search::CutoffLuby::n_start = 63U
staticprotected

Number of pre-computed luby values.

Definition at line 573 of file search.hh.

◆ start

unsigned long int Gecode::Search::CutoffLuby::start[n_start]
staticprotected

Precomputed luby-values.

Definition at line 575 of file search.hh.


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