Gecode::Int::IntVarImpBase Class Reference

Base-class for Int-variable implementations. More...

`#include <var-imp.hpp>`

## Public Member Functions

| IntVarImpBase (void)
| Constructor for creating static instance of variable.
| IntVarImpBase (Gecode::Space &home)
| Constructor for creating variable.
Public Member Functions inherited from Gecode::VarImp< Gecode::Int::IntVarImpConf >
| VarImp (Space &home)
| Creation.
void | subscribe (Space &home, Propagator &p, PropCond pc, bool assigned, ModEvent me, bool schedule)
| Subscribe propagator p with propagation condition pc.
unsigned int | degree (void) const
| Return degree (number of subscribed propagators and advisors).
double | afc (void) const
| Return accumulated failure count (plus degree).
bool | copied (void) const
| Is variable already copied.
VarImp * | forward (void) const
| Use forward pointer if variable already copied.
unsigned int | bits (void) const
| Provide access to free bits.

## Protected Member Functions

| IntVarImpBase (Gecode::Space &home, IntVarImpBase &x)
| Constructor for cloning x.
Protected Member Functions inherited from Gecode::VarImp< Gecode::Int::IntVarImpConf >
void | cancel (Space &home)
| Cancel all subscriptions when variable implementation is assigned.
bool | advise (Space &home, ModEvent me, Delta &d)
| Run advisors when variable implementation has been modified with modification event me and domain change d.
ModEvent | fail (Space &home)
| Run advisors to be run on failure and returns ME_GEN_FAILED.

## Dependencies

void | subscribe (Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule)
| Subscribe propagator p with propagation condition pc.
void | subscribe (Gecode::Space &home, Gecode::Advisor &a, bool assigned, bool failed)
| Subscribe advisor a if assigned is false.
Gecode::ModEvent | notify (Gecode::Space &home, Gecode::ModEvent me, Gecode::Delta &d)
| Notify that variable implementation has been modified with modification event me and delta information d.
void | reschedule (Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned)
| Re-schedule propagator p.
static void | schedule (Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me)
| Schedule propagator p.

## Additional Inherited Members

static void | schedule (Space &home, Propagator &p, ModEvent me, bool force=false)
| Schedule propagator p with modification event me.
static void | reschedule (Space &home, Propagator &p, PropCond pc, bool assigned, ModEvent me)
| Schedule propagator p.
static ModEvent | me (const ModEventDelta &med)
| Project modification event for this variable type from med.
static ModEventDelta | med (ModEvent me)
| Translate modification event me into modification event delta.
static ModEvent | me_combine (ModEvent me1, ModEvent me2)
| Combine modifications events me1 and me2.
static ModEvent | modevent (const Delta &d)
| Return modification event.
static void * | operator new (size_t, Space &)
| Allocate memory from space.
static void | operator delete (void *, Space &)
| Return memory to space.
Public Attributes inherited from Gecode::VarImp< Gecode::Int::IntVarImpConf >
ActorLink ** | base
| Subscribed actors.
VarImp< Gecode::Int::IntVarImpConf > * | fwd
| Forwarding pointer.
unsigned int | idx [pc_max+1]
| Indices of subscribed actors.
VarImp< Gecode::Int::IntVarImpConf > * | next
| During cloning, points to the next copied variable.

## Detailed Description

Base-class for Int-variable implementations.

Definition at line 47 of file var-imp.hpp.

## Constructor & Destructor Documentation

## IntVarImpBase() [1/3]

Gecode::Int::IntVarImpBase::IntVarImpBase | ( | Gecode::Space & | home,
|  | IntVarImpBase & | x )

inline protected

Constructor for cloning x.

Definition at line 239 of file var-imp.hpp.

## IntVarImpBase() [2/3]

Gecode::Int::IntVarImpBase::IntVarImpBase | ( | void |  | ) |

inline

Constructor for creating static instance of variable.

Definition at line 232 of file var-imp.hpp.

## IntVarImpBase() [3/3]

Gecode::Int::IntVarImpBase::IntVarImpBase | ( | Gecode::Space & | home | ) |

inline

Constructor for creating variable.

Definition at line 235 of file var-imp.hpp.

## Member Function Documentation

## subscribe() [1/2]

void Gecode::Int::IntVarImpBase::subscribe | ( | Gecode::Space & | home,
|  | Gecode::Propagator & | p,
|  | Gecode::PropCond | pc,
|  | bool | assigned,
|  | bool | schedule )

inline

Subscribe propagator p with propagation condition pc.

In case schedule is false, the propagator is just subscribed but not scheduled for execution (this must be used when creating subscriptions during propagation).

In case the variable is assigned (that is, assigned is true), the subscribing propagator is scheduled for execution. Otherwise, the propagator subscribes and is scheduled for execution with modification event me provided that pc is different from PC_INT_VAL.

Definition at line 243 of file var-imp.hpp.

## subscribe() [2/2]

void Gecode::Int::IntVarImpBase::subscribe | ( | Gecode::Space & | home,
|  | Gecode::Advisor & | a,
|  | bool | assigned,
|  | bool | failed )

inline

Subscribe advisor a if assigned is false.

Definition at line 247 of file var-imp.hpp.

## notify()

Gecode::ModEvent Gecode::Int::IntVarImpBase::notify | ( | Gecode::Space & | home,
|  | Gecode::ModEvent | me,
|  | Gecode::Delta & | d )

inline

Notify that variable implementation has been modified with modification event me and delta information d.

Definition at line 261 of file var-imp.hpp.

## schedule()

void Gecode::Int::IntVarImpBase::schedule | ( | Gecode::Space & | home,
|  | Gecode::Propagator & | p,
|  | Gecode::ModEvent | me )

inline static

Schedule propagator p.

Definition at line 252 of file var-imp.hpp.

## reschedule()

void Gecode::Int::IntVarImpBase::reschedule | ( | Gecode::Space & | home,
|  | Gecode::Propagator & | p,
|  | Gecode::PropCond | pc,
|  | bool | assigned )

inline

Re-schedule propagator p.

In case the variable is assigned (that is, assigned is true), the propagator is scheduled for execution. Otherwise, the propagator is scheduled for execution with modification event me provided that pc is different from PC_INT_VAL.

Definition at line 256 of file var-imp.hpp.

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

- gecode/kernel/var-imp.hpp