Generated on Mon Aug 25 11:35:47 2008 for Gecode by doxygen 1.5.6

Extensional constraints
[Using finite domain integers]


Detailed Description

Extensional constraints support different ways of how the extensionally defined relation between the variables is defined. Examples include specification by a DFA or a table.

A DFA can be defined by a regular expression, for regular expressions see the module MiniModel.


Classes

class  Gecode::DFA
 Deterministic finite automaton (DFA). More...
class  Gecode::TupleSet
 Data stored for a Table. More...

Functions

void Gecode::extensional (Space *home, const IntVarArgs &x, DFA d, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF)
 Post propagator for extensional constraint described by a DFA.
void Gecode::extensional (Space *home, const IntVarArgs &x, const TupleSet &t, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF)
 Post propagator for $x\in T$.


Function Documentation

void Gecode::extensional ( Space *  home,
const IntVarArgs &  x,
DFA  d,
IntConLevel  icl = ICL_DEF,
PropKind  pk = PK_DEF 
)

Post propagator for extensional constraint described by a DFA.

The elements of x must be a word of the language described by the DFA d.

Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply. If shared occurences of variables are required, unshare should be used.

Definition at line 45 of file extensional.cc.

void Gecode::extensional ( Space *  home,
const IntVarArgs &  x,
const TupleSet &  t,
IntConLevel  icl = ICL_DEF,
PropKind  pk = PK_DEF 
)

Post propagator for $x\in T$.

  • Supports implementations optimized for memory (pk = PK_MEMORY, default) and speed (pk = PK_SPEED).
  • Supports domain consistency (icl = ICL_DOM, default) only.
  • Throws an exception of type Int::ArgumentSizeMismatch, if x and t are of different size.
Warning:
If the domains for the $x_i$ are not dense and have similar bounds, lots of memory will be wasted (memory consumption is in $ O\left(|x|\cdot\min_i(\underline{x_i})\cdot\max_i(\overline{x_i})\right)$ for the basic algorithm (pk = PK_MEMORY) and additionally $ O\left(|x|^2\cdot\min_i(\underline{x_i})\cdot\max_i(\overline{x_i})\right)$ for the incremental algorithm (pk = PK_SPEED).
  • Supports implementations optimized for memory (pk = PK_MEMORY, default) and speed (pk = PK_SPEED).
  • Supports domain consistency (icl = ICL_DOM, default) only.
  • Throws an exception of type Int::ArgumentSizeMismatch, if x and t are of different size.

Definition at line 69 of file extensional.cc.