Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
Clasp::ScheduleStrategy Struct Reference

Implements clasp's configurable schedule-strategies. More...

#include <solver_strategies.h>

List of all members.

Public Types

enum  Type { geometric_schedule = 0, arithmetic_schedule = 1, luby_schedule = 2, user_schedule = 3 }

Public Member Functions

void advanceTo (uint32 idx)
uint64 current () const
bool defaulted () const
bool disabled () const
uint64 next ()
void reset ()
 ScheduleStrategy (Type t=geometric_schedule, uint32 b=100, double g=1.5, uint32 o=0)

Static Public Member Functions

static ScheduleStrategy arith (uint32 base, double add, uint32 limit=0)
 Creates arithmetic sequence base + (add*k) with optional outer limit.
static ScheduleStrategy def ()
static ScheduleStrategy fixed (uint32 base)
 Creates fixed sequence with length base.
static ScheduleStrategy geom (uint32 base, double grow, uint32 limit=0)
 Creates geometric sequence base * (grow^k) with optional outer limit.
static ScheduleStrategy luby (uint32 unit, uint32 limit=0)
 Creates luby's sequence with unit-length unit and optional outer limit.
static ScheduleStrategy none ()

Public Attributes

uint32 base: 30
float grow
uint32 idx
uint32 len
uint32 type: 2

Detailed Description

Implements clasp's configurable schedule-strategies.

clasp currently supports the following basic strategies:

Furthermore, an inner-outer scheme can be applied to the selected sequence. In that case, the sequence is repeated every <limit>+j restarts, where <limit> is the initial outer-limit and j is the number of times the sequence was already repeated.

Note:
For luby's seqeuence, j is not a repetition counter but the index where the sequence grows to the next power of two.
See also:
Luby et al. "Optimal speedup of las vegas algorithms."

Definition at line 54 of file solver_strategies.h.


Member Enumeration Documentation

Enumerator:
geometric_schedule 
arithmetic_schedule 
luby_schedule 
user_schedule 

Definition at line 56 of file solver_strategies.h.


Constructor & Destructor Documentation

Clasp::ScheduleStrategy::ScheduleStrategy ( Type  t = geometric_schedule,
uint32  b = 100,
double  g = 1.5,
uint32  o = 0 
)

Definition at line 85 of file solver_strategies.cpp.


Member Function Documentation

void Clasp::ScheduleStrategy::advanceTo ( uint32  idx)

Definition at line 108 of file solver_strategies.cpp.

static ScheduleStrategy Clasp::ScheduleStrategy::arith ( uint32  base,
double  add,
uint32  limit = 0 
) [inline, static]

Creates arithmetic sequence base + (add*k) with optional outer limit.

Definition at line 64 of file solver_strategies.h.

Definition at line 93 of file solver_strategies.cpp.

static ScheduleStrategy Clasp::ScheduleStrategy::def ( ) [inline, static]

Definition at line 68 of file solver_strategies.h.

bool Clasp::ScheduleStrategy::defaulted ( ) const [inline]

Definition at line 71 of file solver_strategies.h.

bool Clasp::ScheduleStrategy::disabled ( ) const [inline]

Definition at line 70 of file solver_strategies.h.

static ScheduleStrategy Clasp::ScheduleStrategy::fixed ( uint32  base) [inline, static]

Creates fixed sequence with length base.

Definition at line 66 of file solver_strategies.h.

static ScheduleStrategy Clasp::ScheduleStrategy::geom ( uint32  base,
double  grow,
uint32  limit = 0 
) [inline, static]

Creates geometric sequence base * (grow^k) with optional outer limit.

Definition at line 62 of file solver_strategies.h.

static ScheduleStrategy Clasp::ScheduleStrategy::luby ( uint32  unit,
uint32  limit = 0 
) [inline, static]

Creates luby's sequence with unit-length unit and optional outer limit.

Definition at line 60 of file solver_strategies.h.

Definition at line 101 of file solver_strategies.cpp.

static ScheduleStrategy Clasp::ScheduleStrategy::none ( ) [inline, static]

Definition at line 67 of file solver_strategies.h.

void Clasp::ScheduleStrategy::reset ( ) [inline]

Definition at line 72 of file solver_strategies.h.


Member Data Documentation

Definition at line 75 of file solver_strategies.h.

Definition at line 79 of file solver_strategies.h.

Definition at line 77 of file solver_strategies.h.

Definition at line 78 of file solver_strategies.h.

Definition at line 76 of file solver_strategies.h.


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


clasp
Author(s): Benjamin Kaufmann
autogenerated on Thu Aug 27 2015 12:41:41