38 #ifndef __GECODE_INT_EXTENSIONAL_HH__ 39 #define __GECODE_INT_EXTENSIONAL_HH__ 50 namespace Gecode {
namespace Int {
namespace Extensional {
66 template<
class View,
class Val,
class Degree,
class StateIdx>
114 bool operator ()(
void)
const;
116 void operator ++(
void);
147 bool empty(
void)
const;
224 namespace Gecode {
namespace Int {
namespace Extensional {
235 template<
class IndexType>
247 void replace_and_decrease(IndexType
i, BitSetData w);
252 template<
class OldIndexType>
263 unsigned int limit(
void)
const;
265 bool empty(
void)
const;
267 unsigned int width(
void)
const;
269 void clear_mask(BitSetData* mask)
const;
271 void add_to_mask(
const BitSetData*
b, BitSetData* mask)
const;
273 template<
bool sparse>
274 void intersect_with_mask(
const BitSetData* mask);
276 void intersect_with_masks(
const BitSetData*
a,
const BitSetData*
b);
278 bool intersects(
const BitSetData*
b)
const;
280 void nand_with_mask(
const BitSetData*
b);
282 unsigned int words(
void)
const;
284 unsigned int size(
void)
const;
291 namespace Gecode {
namespace Int {
namespace Extensional {
294 template<
unsigned int _size>
304 template<
unsigned int largersize>
307 template<
class IndexType>
310 int limit(
void)
const;
312 bool empty(
void)
const;
314 unsigned int width(
void)
const;
320 template<
bool sparse>
321 void intersect_with_mask(
const BitSetData* mask);
331 unsigned int words(
void)
const;
333 unsigned int size(
void)
const;
340 namespace Gecode {
namespace Int {
namespace Extensional {
372 const Range* fst(
void)
const;
374 const Range* lst(
void)
const;
406 void propagating(
void);
432 void operator ++(
void);
434 bool operator ()(
void)
const;
458 void operator ++(
void);
460 bool operator ()(
void)
const;
502 template<
class View,
class Table>
521 template<
class TableProp>
bool empty(void) const
Test whether actor link is empty (points to itself)
IndexRange i_ch
Index range with in-degree modifications.
TupleSet ts
The tuple set.
void audit(void)
Perform consistency check on data structures.
Edge defined by in-state and out-state
Council< Index > c
The advisor council.
int n
Number of layers (and views)
Iterator for telling variable domains by scanning support.
IndexRange a_ch
Index range for any change (for compression)
StateIdx n_states
Number of states used by outgoing edges.
Iterator over valid supports.
const unsigned int n_words
Number of words in supports.
unsigned int n_states
Total number of states.
const Range * r
Range information.
int * Tuple
Type of a tuple.
StateIdx i_state
Number of in-state.
Base-class for propagators.
Compact< View >::CTAdvisor CTAdvisor
Iterator over lost supports.
Gecode::Support::BitSetData BitSetData
Import type.
ViewRanges< View > xr
Range iterator.
Advisor storing a single view
Support information for a value
const BitSetData * s
The lost value's support.
bool i_dec(int i, const Edge &e)
Decrement out degree for in state of edge e for layer i.
LayeredGraph(Space &home, LayeredGraph< View, Val, Degree, StateIdx > &p)
Constructor for cloning p.
IndexRange o_ch
Index range with out-degree modifications.
Base-class for both propagators and branchers.
Status status
Propagator status.
Range iterator for integer views.
State & o_state(int i, StateIdx os)
Return out state for layer i and state index os.
ValSize size
Number of supported values.
StateIdx o_state
Number of out-state.
Deterministic finite automaton (DFA)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Domain consistent extensional propagator.
::Gecode::TupleSet::Tuple Tuple
Import tuple type.
Compact< View >::Status Status
Support * support
Supported values.
ExecStatus postcompact(Home home, ViewArray< View > &x, const TupleSet &ts)
Post function for compact table propagator.
Range approximation of which positions have changed.
const unsigned int n_words
Number of words.
ModEventDelta med
A set of modification events (used during propagation)
Layer for a view in the layered graph
Degree n_edges
Number of supporting edges.
void range(Home home, const IntVarArgs &x, SetVar y, SetVar z)
Post constraint .
Compact< View >::StatusType StatusType
size_t size
The size of the propagator (used during subsumption)
Layer * layers
The layers of the graph.
StateIdx max_states
Maximal number of states per layer.
ExecStatus post_lgp(Home home, const VarArgArray< Var > &x, const DFA &dfa)
Select small types for the layered graph propagator.
const Range * _lst
Last range of support data structure.
Council< CTAdvisor > c
The advisor council.
Traits to for information about integer types.
Degree o_deg
The out-degree (number of outgoing edges) Initialize with zeroes.
State * states
States used by outgoing edges.
const BitSetData * s
The value's support.
Table table
Current table.
Domain consistent layered graph (regular) propagator.
IndexType * index
Indices.
Class represeting a set of tuples.
const Range * sr
Support iterator.
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
static ExecStatus post(Home home, const VarArgArray< Var > &x, const DFA &dfa)
Post propagator on views x and DFA dfa.
Compact< View >::ValidSupports ValidSupports
Generic domain change information to be supplied to advisors.
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
Advisors for views (by position in array)
const Range * _fst
First range of support data structure.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Advisor for updating current table.
Post propagator for SetVar x
virtual Actor * copy(Space &home)
Copy propagator during cloning.
ptrdiff_t s
A tagged pointer for storing the status.
Edge * edges
Supporting edges in layered graph.
Compact< View >::LostSupports LostSupports
Compact< View >::Range Range
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high linear)
State & i_state(int i, StateIdx is)
Return in state for layer i and state index is.
Gecode toplevel namespace
Argument array for variables.
const unsigned int n_words
Number of words.
ExecStatus initialize(Space &home, const VarArgArray< Var > &x, const DFA &dfa)
Initialize layered graph.
Base class for compact table propagator.
States are described by number of incoming and outgoing edges.
Degree i_deg
The in-degree (number of incoming edges)
int unassigned
Number of unassigned views.
virtual void reschedule(Space &home)
Schedule function.
bool o_dec(int i, const Edge &e)
Decrement in degree for out state of edge e for layer i.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
StatusType
Type of status.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
unsigned int n_edges
Total number of edges.
Gecode::Support::IntTypeTraits< Val >::utype ValSize
Type for support size.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
int i
The position of the view in the view array.
TupleSet::Range Range
Range type for supports.