Gecode::ViewTraceRecorder< View > Class Template Reference
Functionality by programming task » Programming models » Tracing constraint propagation

Propagator for recording view trace information. More...

`#include <recorder.hpp>`

## Classes

class | Slack
| Collection of slack values. More...
class | Idx
| Advisor with index information. More...

## Public Types

typedef TraceTraits< View >::TraceView | TraceView
| The corresponding duplicate view type.
typedef TraceTraits< View >::TraceDelta | TraceDelta
| The corresponding trace delta type.
typedef TraceTraits< View >::SlackValue | SlackValue
| The corresponding slack value type.

## Public Member Functions

| ViewTraceRecorder (Home home, ViewArray< View > &x, TraceFilter tf, int te, ViewTracer< View > &t)
| Constructor for creation.
virtual Propagator * | copy (Space &home)
| Copy propagator during cloning.
virtual PropCost | cost (const Space &home, const ModEventDelta &med) const
| Cost function (record so that propagator runs last).
virtual void | reschedule (Space &home)
| Schedule function.
virtual ExecStatus | advise (Space &home, Advisor &a, const Delta &d)
| Give advice to propagator.
virtual ExecStatus | propagate (Space &home, const ModEventDelta &med)
| Perform propagation.
virtual size_t | dispose (Space &home)
| Delete propagator and return its size.
ModEventDelta | modeventdelta (void) const
| Return the modification event delta.
virtual void | advise (Space &home, Advisor &a)
| Run advisor a to be run on failure in failed space.
double | afc (void) const
| Return the accumlated failure count.
unsigned int | id (void) const
| Return propagator id.
PropagatorGroup | group (void) const
| Return group propagator belongs to.
void | group (PropagatorGroup g)
| Add propagator to group g.
bool | disabled (void) const
| Whether propagator is currently disabled.
virtual | ~Actor (void)
| To avoid warnings.

## Static Public Member Functions

static ExecStatus | post (Home home, ViewArray< View > &x, TraceFilter tf, int te, ViewTracer< View > &t)
| Post recorder propagator.
static void * | operator new (size_t s, Space &home)
| Allocate memory from space.
static void | operator delete (void *p, Space &home)
| No-op for exceptions.
static void * | operator new (size_t s)
| Not used.
static void | operator delete (void *p)
| Not used.

## Protected Member Functions

| ViewTraceRecorder (Space &home, ViewTraceRecorder &p)
| Constructor for cloning p.
Protected Member Functions inherited from Gecode::Propagator
| Propagator (Home home)
| Constructor for posting.
| Propagator (Space &home, Propagator &p)
| Constructor for cloning p.
Propagator * | fwd (void) const
| Return forwarding pointer during copying.
Kernel::GPI::Info & | gpi (void)
| Provide access to global propagator information.

## Protected Attributes

ViewArray< TraceView > | o
| Duplicate views (old information).
ViewArray< View > | n
| Original views (new information).
Council< Idx > | c
| The advisor council.
TraceFilter | tf
| The trace filter.
int | te
| Which events to trace.
ViewTracer< View > & | t
| The actual tracer.
Slack | s
| Slack information.

## Trace information

const View::VarType | operator[] (int i) const
| Return variable being traced at position i.
int | size (void) const
| Return number of variables being traced.
const Slack & | slack (void) const
| Provide access to slack information.

## Detailed Description

template<class View>
class Gecode::ViewTraceRecorder< View >

Propagator for recording view trace information.

Definition at line 60 of file recorder.hpp.

## Member Typedef Documentation

## TraceView

template<class View>

typedef TraceTraits<View>::TraceView Gecode::ViewTraceRecorder< View >::TraceView

The corresponding duplicate view type.

Definition at line 63 of file recorder.hpp.

## TraceDelta

template<class View>

typedef TraceTraits<View>::TraceDelta Gecode::ViewTraceRecorder< View >::TraceDelta

The corresponding trace delta type.

Definition at line 65 of file recorder.hpp.

## SlackValue

template<class View>

typedef TraceTraits<View>::SlackValue Gecode::ViewTraceRecorder< View >::SlackValue

The corresponding slack value type.

Definition at line 67 of file recorder.hpp.

## Constructor & Destructor Documentation

## ViewTraceRecorder() [1/2]

template<class View>

Gecode::ViewTraceRecorder< View >::ViewTraceRecorder | ( | Space & | home,
|  | ViewTraceRecorder< View > & | p )

inline protected

Constructor for cloning p.

Definition at line 301 of file recorder.hpp.

## ViewTraceRecorder() [2/2]

template<class View>

Gecode::ViewTraceRecorder< View >::ViewTraceRecorder | ( | Home | home,
|  | ViewArray< View > & | x,
|  | TraceFilter | tf,
|  | int | te,
|  | ViewTracer< View > & | t )

inline

Constructor for creation.

Definition at line 262 of file recorder.hpp.

## Member Function Documentation

## copy()

template<class View>

Propagator * Gecode::ViewTraceRecorder< View >::copy | ( | Space & | home | ) |

virtual

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 310 of file recorder.hpp.

## cost()

template<class View>

PropCost Gecode::ViewTraceRecorder< View >::cost | ( | const Space & | home,
|  | const ModEventDelta & | med ) const

virtual

Cost function (record so that propagator runs last).

Implements Gecode::Propagator.

Definition at line 330 of file recorder.hpp.

## reschedule()

template<class View>

void Gecode::ViewTraceRecorder< View >::reschedule | ( | Space & | home | ) |

virtual

Schedule function.

Implements Gecode::Propagator.

Definition at line 336 of file recorder.hpp.

## advise()

template<class View>

ExecStatus Gecode::ViewTraceRecorder< View >::advise | ( | Space & | home,
|  | Advisor & | a,
|  | const Delta & | d )

virtual

Give advice to propagator.

Reimplemented from Gecode::Propagator.

Definition at line 342 of file recorder.hpp.

## propagate()

template<class View>

ExecStatus Gecode::ViewTraceRecorder< View >::propagate | ( | Space & | home,
|  | const ModEventDelta & | med )

virtual

Perform propagation.

Implements Gecode::Propagator.

Definition at line 357 of file recorder.hpp.

## dispose()

template<class View>

size_t Gecode::ViewTraceRecorder< View >::dispose | ( | Space & | home | ) |

inline virtual

Delete propagator and return its size.

Reimplemented from Gecode::Actor.

Definition at line 316 of file recorder.hpp.

## post()

template<class View>

ExecStatus Gecode::ViewTraceRecorder< View >::post | ( | Home | home,
|  | ViewArray< View > & | x,
|  | TraceFilter | tf,
|  | int | te,
|  | ViewTracer< View > & | t )

inline static

Post recorder propagator.

Definition at line 286 of file recorder.hpp.

## operator[]()

template<class View>

const View::VarType Gecode::ViewTraceRecorder< View >::operator[] | ( | int | i | ) | const

inline

Return variable being traced at position i.

Definition at line 197 of file recorder.hpp.

## size()

template<class View>

int Gecode::ViewTraceRecorder< View >::size | ( | void |  | ) | const

inline

Return number of variables being traced.

Definition at line 203 of file recorder.hpp.

## slack()

template<class View>

const ViewTraceRecorder< View >::Slack & Gecode::ViewTraceRecorder< View >::slack | ( | void |  | ) | const

inline

Provide access to slack information.

Definition at line 208 of file recorder.hpp.

## Member Data Documentation

## o

template<class View>

ViewArray<TraceView> Gecode::ViewTraceRecorder< View >::o

protected

Duplicate views (old information).

Definition at line 101 of file recorder.hpp.

## n

template<class View>

ViewArray<View> Gecode::ViewTraceRecorder< View >::n

protected

Original views (new information).

Definition at line 103 of file recorder.hpp.

## c

template<class View>

Council<Idx> Gecode::ViewTraceRecorder< View >::c

protected

The advisor council.

Definition at line 105 of file recorder.hpp.

## tf

template<class View>

TraceFilter Gecode::ViewTraceRecorder< View >::tf

protected

The trace filter.

Definition at line 107 of file recorder.hpp.

## te

template<class View>

int Gecode::ViewTraceRecorder< View >::te

protected

Which events to trace.

Definition at line 109 of file recorder.hpp.

## t

template<class View>

ViewTracer<View>& Gecode::ViewTraceRecorder< View >::t

protected

The actual tracer.

Definition at line 111 of file recorder.hpp.

## s

template<class View>

Slack Gecode::ViewTraceRecorder< View >::s

protected

Slack information.

Definition at line 113 of file recorder.hpp.

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

- gecode/kernel/trace/recorder.hpp