Classes | |
| class | Gecode::DFA |
| Finite automaton with deterministic construction by default. More... | |
| class | Gecode::TupleSet |
| Class representing a set of tuples. More... | |
Enumerations | |
| enum class | Gecode::ExtensionalPropKind { Gecode::ExtensionalPropKind::EPK_AUTO , Gecode::ExtensionalPropKind::EPK_DENSE , Gecode::ExtensionalPropKind::EPK_SPARSE , Gecode::ExtensionalPropKind::EPK_DENSE_COMPRESSED } |
| Support representation selection for extensional tuple sets. More... | |
Functions | |
| void | Gecode::extensional (Home home, const IntVarArgs &x, DFA d, IntPropLevel ipl=IPL_DEF) |
| Post domain consistent propagator for extensional constraint described by a DFA. | |
| void | Gecode::extensional (Home home, const BoolVarArgs &x, DFA d, IntPropLevel ipl=IPL_DEF) |
| Post domain consistent propagator for extensional constraint described by a DFA. | |
| void | Gecode::extensional (Home home, OpenIntVarList x, DFA d, IntPropLevel ipl=IPL_DEF) |
| Post an open regular-language constraint. | |
| void | Gecode::extensional (Home home, OpenBoolVarList x, DFA d, IntPropLevel ipl=IPL_DEF) |
| Post an open regular-language constraint on Boolean variables. | |
| void | Gecode::extensional (Home home, const IntVarArgs &x, const TupleSet &t, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(x\in t\). | |
| void | Gecode::extensional (Home home, const IntVarArgs &x, const TupleSet &t, bool pos, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(x\in t\) or \(x\not\in t\). | |
| void | Gecode::extensional (Home home, const IntVarArgs &x, const TupleSet &t, Reify r, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \((x\in t)\equiv r\). | |
| void | Gecode::extensional (Home home, const IntVarArgs &x, const TupleSet &t, bool pos, Reify r, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \((x\in t)\equiv r\) or \((x\not\in t)\equiv r\). | |
| void | Gecode::extensional (Home home, const BoolVarArgs &x, const TupleSet &t, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(x\in t\). | |
| void | Gecode::extensional (Home home, const BoolVarArgs &x, const TupleSet &t, bool pos, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(x\in t\) or \(x\not\in t\). | |
| void | Gecode::extensional (Home home, const BoolVarArgs &x, const TupleSet &t, Reify r, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \((x\in t)\equiv r\). | |
| void | Gecode::extensional (Home home, const BoolVarArgs &x, const TupleSet &t, bool pos, Reify r, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \((x\in t)\equiv r\) or \((x\not\in t)\equiv r\). | |
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.
Enumeration Type Documentation
◆ ExtensionalPropKind
|
strong |
Support representation selection for extensional tuple sets.
The selector controls which support representation is materialized by TupleSet::finalize(ExtensionalPropKind). Tuple-set posting dispatches to the propagator for the concrete representation stored in the tuple set. During finalization, EPK_AUTO selects dense or compressed support according to the normal size and density policy; it never selects sparse support.
Function Documentation
◆ extensional() [1/12]
| void Gecode::extensional | ( | Home | home, |
| const IntVarArgs & | x, | ||
| DFA | d, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post domain consistent propagator for extensional constraint described by a DFA.
The elements of x must be a word of the language described by the automaton d, which may be constructed with DFA::nfa().
Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply. If shared occurrences of variables are required, unshare should be used.
Definition at line 39 of file extensional-regular.cpp.
◆ extensional() [2/12]
| void Gecode::extensional | ( | Home | home, |
| const BoolVarArgs & | x, | ||
| DFA | d, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post domain consistent propagator for extensional constraint described by a DFA.
The elements of x must be a word of the language described by the automaton d, which may be constructed with DFA::nfa().
Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply. If shared occurrences of variables are required, unshare should be used.
Definition at line 49 of file extensional-regular.cpp.
◆ extensional() [3/12]
| void Gecode::extensional | ( | Home | home, |
| OpenIntVarList | x, | ||
| DFA | d, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post an open regular-language constraint.
While x is open, its materialized prefix must have a continuation accepted by d within the maximum length of x. Future variable domains and holes in the length domain are not used to filter these continuations. Once its length equals its materialized size, the complete list must be accepted by d.
Definition at line 59 of file extensional-regular.cpp.
◆ extensional() [4/12]
| void Gecode::extensional | ( | Home | home, |
| OpenBoolVarList | x, | ||
| DFA | d, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post an open regular-language constraint on Boolean variables.
As for integer lists, the materialized prefix must have an accepted continuation within its maximum length while open, and the complete list must be accepted when closed.
Definition at line 67 of file extensional-regular.cpp.
◆ extensional() [5/12]
|
inline |
Post propagator for \(x\in t\).
- Supports domain consistency (ipl = IPL_DOM, default) only.
- Throws an exception of type Int::ArgumentSizeMismatch, if x and t are of different size.
- Throws an exception of type Int::NotYetFinalized, if the tuple set t has not been finalized.
Definition at line 37 of file extensional.hpp.
◆ extensional() [6/12]
| void Gecode::extensional | ( | Home | home, |
| const IntVarArgs & | x, | ||
| const TupleSet & | t, | ||
| bool | pos, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \(x\in t\) or \(x\not\in t\).
- If pos is true, it posts a propagator for \(x\in t\) and otherwise for \(x\not\in t\).
- Supports domain consistency (ipl = IPL_DOM, default) only.
- Throws an exception of type Int::ArgumentSizeMismatch, if x and t are of different size.
- Throws an exception of type Int::NotYetFinalized, if the tuple set t has not been finalized.
Definition at line 1005 of file extensional-tuple-set.cpp.
◆ extensional() [7/12]
|
inline |
Post propagator for \((x\in t)\equiv r\).
- Supports domain consistency (ipl = IPL_DOM, default) only.
- Throws an exception of type Int::ArgumentSizeMismatch, if x and t are of different size.
- Throws an exception of type Int::NotYetFinalized, if the tuple set t has not been finalized.
Definition at line 43 of file extensional.hpp.
◆ extensional() [8/12]
| void Gecode::extensional | ( | Home | home, |
| const IntVarArgs & | x, | ||
| const TupleSet & | t, | ||
| bool | pos, | ||
| Reify | r, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \((x\in t)\equiv r\) or \((x\not\in t)\equiv r\).
- If pos is true, it posts a propagator for \((x\in t)\equiv r\) and otherwise for \((x\not\in t)\equiv r\).
- Supports domain consistency (ipl = IPL_DOM, default) only.
- Throws an exception of type Int::ArgumentSizeMismatch, if x and t are of different size.
- Throws an exception of type Int::NotYetFinalized, if the tuple set t has not been finalized.
Definition at line 1034 of file extensional-tuple-set.cpp.
◆ extensional() [9/12]
|
inline |
Post propagator for \(x\in t\).
- Supports domain consistency (ipl = IPL_DOM, default) only.
- Throws an exception of type Int::ArgumentSizeMismatch, if x and t are of different size.
- Throws an exception of type Int::NotYetFinalized, if the tuple set t has not been finalized.
Definition at line 49 of file extensional.hpp.
◆ extensional() [10/12]
| void Gecode::extensional | ( | Home | home, |
| const BoolVarArgs & | x, | ||
| const TupleSet & | t, | ||
| bool | pos, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \(x\in t\) or \(x\not\in t\).
- If pos is true, it posts a propagator for \(x\in t\) and otherwise for \(x\not\in t\).
- Supports domain consistency (ipl = IPL_DOM, default) only.
- Throws an exception of type Int::ArgumentSizeMismatch, if x and t are of different size.
- Throws an exception of type Int::NotYetFinalized, if the tuple set t has not been finalized.
Definition at line 1068 of file extensional-tuple-set.cpp.
◆ extensional() [11/12]
|
inline |
Post propagator for \((x\in t)\equiv r\).
- Supports domain consistency (ipl = IPL_DOM, default) only.
- Throws an exception of type Int::ArgumentSizeMismatch, if x and t are of different size.
- Throws an exception of type Int::NotYetFinalized, if the tuple set t has not been finalized.
Definition at line 55 of file extensional.hpp.
◆ extensional() [12/12]
| void Gecode::extensional | ( | Home | home, |
| const BoolVarArgs & | x, | ||
| const TupleSet & | t, | ||
| bool | pos, | ||
| Reify | r, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \((x\in t)\equiv r\) or \((x\not\in t)\equiv r\).
- If pos is true, it posts a propagator for \((x\in t)\equiv r\) and otherwise for \((x\not\in t)\equiv r\).
- Supports domain consistency (ipl = IPL_DOM, default) only.
- Throws an exception of type Int::ArgumentSizeMismatch, if x and t are of different size.
- Throws an exception of type Int::NotYetFinalized, if the tuple set t has not been finalized.
Definition at line 1099 of file extensional-tuple-set.cpp.
