Gecode::Int::Exec::When Class Reference
Other available functionality » Integer propagators

Conditional propagator. More...

`#include <exec.hh>`

## Public Member Functions

virtual Actor * | copy (Space &home)
| Copy propagator during cloning.
virtual ExecStatus | propagate (Space &home, const ModEventDelta &med)
| Perform propagation.
virtual size_t | dispose (Space &home)
| Dispose propagator.
Public Member Functions inherited from Gecode::UnaryPropagator< BoolView, PC_BOOL_VAL >
virtual PropCost | cost (const Space &home, const ModEventDelta &med) const
| Cost function (defined as PC_UNARY_LO).
virtual void | reschedule (Space &home)
| Schedule function.
ModEventDelta | modeventdelta (void) const
| Return the modification event delta.
virtual ExecStatus | advise (Space &home, Advisor &a, const Delta &d)
| Advise function.
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, BoolView x, std::function< void(Space &home)> t, std::function< void(Space &home)> e)
| Post 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

| When (Space &home, When &p)
| Constructor for cloning p.
| When (Home home, BoolView x, std::function< void(Space &home)> t, std::function< void(Space &home)> e)
| Constructor for creation.
Protected Member Functions inherited from Gecode::UnaryPropagator< BoolView, PC_BOOL_VAL >
| UnaryPropagator (Space &home, UnaryPropagator &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

SharedData< std::function< void(Space &home)> > | t
| Then function.
SharedData< std::function< void(Space &home)> > | e
| Else function pointer.
Protected Attributes inherited from Gecode::UnaryPropagator< BoolView, PC_BOOL_VAL >
BoolView | x0
| Single view.

## Detailed Description

Conditional propagator.

Requires

#include <gecode/int/exec.hh>
exec.hh

Definition at line 52 of file exec.hh.

## Constructor & Destructor Documentation

## When() [1/2]

Gecode::Int::Exec::When::When | ( | Space & | home,
|  | When & | p )

inline protected

Constructor for cloning p.

Definition at line 45 of file when.hpp.

## When() [2/2]

Gecode::Int::Exec::When::When | ( | Home | home,
|  | BoolView | x,
|  | std::function< void(Space &home)> | t,
|  | std::function< void(Space &home)> | e )

inline protected

Constructor for creation.

Definition at line 37 of file when.hpp.

## Member Function Documentation

## copy()

Actor * Gecode::Int::Exec::When::copy | ( | Space & | home | ) |

virtual

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 39 of file when.cpp.

## propagate()

ExecStatus Gecode::Int::Exec::When::propagate | ( | Space & | home,
|  | const ModEventDelta & | med )

virtual

Perform propagation.

Implements Gecode::Propagator.

Definition at line 44 of file when.cpp.

## post()

ExecStatus Gecode::Int::Exec::When::post | ( | Home | home,
|  | BoolView | x,
|  | std::function< void(Space &home)> | t,
|  | std::function< void(Space &home)> | e )

inline static

Post propagator.

Definition at line 50 of file when.hpp.

## dispose()

size_t Gecode::Int::Exec::When::dispose | ( | Space & | home | ) |

virtual

Dispose propagator.

Reimplemented from Gecode::UnaryPropagator< BoolView, PC_BOOL_VAL >.

Definition at line 59 of file when.cpp.

## Member Data Documentation

## t

SharedData<std::function<void(Space& home)> > Gecode::Int::Exec::When::t

protected

Then function.

Definition at line 56 of file exec.hh.

## e

SharedData<std::function<void(Space& home)> > Gecode::Int::Exec::When::e

protected

Else function pointer.

Definition at line 58 of file exec.hh.

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

- gecode/int/exec.hh
- gecode/int/exec/when.cpp
- gecode/int/exec/when.hpp