Gecode::Int::Element::Int< V0, V1, Idx, Val > Class Template Reference
Other available functionality » Integer propagators

Element propagator for array of integers More...

`#include <element.hh>`

## Classes

class | IdxVal
| Linked index-value pairs. More...
class | IterIdxUnmark
| Value iterator for indices in index-value map. More...
class | IterVal
| Value iterator for values in index-value map. More...
class | IterValUnmark
| Value iterator for values in index-value map. More...
class | ByVal
| Sorting pointers to (index,value) pairs in value order. More...

## Public Member Functions

virtual Actor * | copy (Space &home)
| Perform copying during cloning.
virtual PropCost | cost (const Space &home, const ModEventDelta &med) const
| Cost function (defined as high binary).
virtual void | reschedule (Space &home)
| Schedule function.
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 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, IntSharedArray &i, V0 x0, V1 x1)
| Post propagator for .
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 Types

typedef Gecode::Support::IntTypeTraits< Idx >::utype | IdxSize
| Type for index size.
typedef Gecode::Support::IntTypeTraits< Val >::utype | ValSize
| Type for value size.

## Protected Member Functions

void | prune_idx (void)
| Prune index according to x0.
void | prune_val (void)
| Prune values according to x1.
| Int (Space &home, Int &p)
| Constructor for cloning p.
| Int (Home home, IntSharedArray &i, V0 x0, V1 x1)
| Constructor for creation.
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.

## Static Protected Member Functions

static ExecStatus | assigned_val (Space &home, IntSharedArray &c, V0 x0, V1 x1)
| Prune when x1 is assigned.

## Protected Attributes

V0 | x0
| View for index.
IdxSize | s0
| Size of x0 at last execution.
V1 | x1
| View for result.
ValSize | s1
| Size of x1 at last execution.
IntSharedArray | c
| Shared array of integer values.
IdxVal * | iv
| The index-value data structure.

## Detailed Description

template<class V0, class V1, class Idx, class Val>
class Gecode::Int::Element::Int< V0, V1, Idx, Val >

Element propagator for array of integers

Requires

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

Definition at line 57 of file element.hh.

## Member Typedef Documentation

## IdxSize

template<class V0, class V1, class Idx, class Val>

typedef Gecode::Support::IntTypeTraits<Idx>::utype Gecode::Int::Element::Int< V0, V1, Idx, Val >::IdxSize

protected

Type for index size.

Definition at line 154 of file element.hh.

## ValSize

template<class V0, class V1, class Idx, class Val>

typedef Gecode::Support::IntTypeTraits<Val>::utype Gecode::Int::Element::Int< V0, V1, Idx, Val >::ValSize

protected

Type for value size.

Definition at line 160 of file element.hh.

## Constructor & Destructor Documentation

## Int() [1/2]

template<class V0, class V1, class Idx, class Val>

Gecode::Int::Element::Int< V0, V1, Idx, Val >::Int | ( | Space & | home,
|  | Int< V0, V1, Idx, Val > & | p )

inline protected

Constructor for cloning p.

Definition at line 191 of file int.hpp.

## Int() [2/2]

template<class V0, class V1, class Idx, class Val>

Gecode::Int::Element::Int< V0, V1, Idx, Val >::Int | ( | Home | home,
|  | IntSharedArray & | i,
|  | V0 | x0,
|  | V1 | x1 )

inline protected

Constructor for creation.

Definition at line 158 of file int.hpp.

## Member Function Documentation

## prune_idx()

template<class V0, class V1, class Idx, class Val>

void Gecode::Int::Element::Int< V0, V1, Idx, Val >::prune_idx | ( | void |  | ) |

protected

Prune index according to x0.

Definition at line 222 of file int.hpp.

## prune_val()

template<class V0, class V1, class Idx, class Val>

void Gecode::Int::Element::Int< V0, V1, Idx, Val >::prune_val | ( | void |  | ) |

protected

Prune values according to x1.

Definition at line 244 of file int.hpp.

## assigned_val()

template<class V0, class V1, class Idx, class Val>

ExecStatus Gecode::Int::Element::Int< V0, V1, Idx, Val >::assigned_val | ( | Space & | home,
|  | IntSharedArray & | c,
|  | V0 | x0,
|  | V1 | x1 )

static protected

Prune when x1 is assigned.

Definition at line 267 of file int.hpp.

## copy()

template<class V0, class V1, class Idx, class Val>

Actor * Gecode::Int::Element::Int< V0, V1, Idx, Val >::copy | ( | Space & | home | ) |

virtual

Perform copying during cloning.

Implements Gecode::Actor.

Definition at line 199 of file int.hpp.

## cost()

template<class V0, class V1, class Idx, class Val>

PropCost Gecode::Int::Element::Int< V0, V1, Idx, Val >::cost | ( | const Space & | home,
|  | const ModEventDelta & | med ) const

virtual

Cost function (defined as high binary).

Implements Gecode::Propagator.

Definition at line 205 of file int.hpp.

## reschedule()

template<class V0, class V1, class Idx, class Val>

void Gecode::Int::Element::Int< V0, V1, Idx, Val >::reschedule | ( | Space & | home | ) |

virtual

Schedule function.

Implements Gecode::Propagator.

Definition at line 215 of file int.hpp.

## propagate()

template<class V0, class V1, class Idx, class Val>

ExecStatus Gecode::Int::Element::Int< V0, V1, Idx, Val >::propagate | ( | Space & | home,
|  | const ModEventDelta & | med )

virtual

Perform propagation.

Implements Gecode::Propagator.

Definition at line 282 of file int.hpp.

## post()

template<class V0, class V1, class Idx, class Val>

ExecStatus Gecode::Int::Element::Int< V0, V1, Idx, Val >::post | ( | Home | home,
|  | IntSharedArray & | i,
|  | V0 | x0,
|  | V1 | x1 )

static

Post propagator for .

Definition at line 178 of file int.hpp.

## dispose()

template<class V0, class V1, class Idx, class Val>

size_t Gecode::Int::Element::Int< V0, V1, Idx, Val >::dispose | ( | Space & | home | ) |

inline virtual

Delete propagator and return its size.

Reimplemented from Gecode::Actor.

Definition at line 167 of file int.hpp.

## Member Data Documentation

## x0

template<class V0, class V1, class Idx, class Val>

V0 Gecode::Int::Element::Int< V0, V1, Idx, Val >::x0

protected

View for index.

Definition at line 152 of file element.hh.

## s0

template<class V0, class V1, class Idx, class Val>

IdxSize Gecode::Int::Element::Int< V0, V1, Idx, Val >::s0

protected

Size of x0 at last execution.

Definition at line 156 of file element.hh.

## x1

template<class V0, class V1, class Idx, class Val>

V1 Gecode::Int::Element::Int< V0, V1, Idx, Val >::x1

protected

View for result.

Definition at line 158 of file element.hh.

## s1

template<class V0, class V1, class Idx, class Val>

ValSize Gecode::Int::Element::Int< V0, V1, Idx, Val >::s1

protected

Size of x1 at last execution.

Definition at line 162 of file element.hh.

## c

template<class V0, class V1, class Idx, class Val>

IntSharedArray Gecode::Int::Element::Int< V0, V1, Idx, Val >::c

protected

Shared array of integer values.

Definition at line 164 of file element.hh.

## iv

template<class V0, class V1, class Idx, class Val>

IdxVal* Gecode::Int::Element::Int< V0, V1, Idx, Val >::iv

protected

The index-value data structure.

Definition at line 166 of file element.hh.

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

- gecode/int/element.hh
- gecode/int/element/int.hpp