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;
223 namespace Gecode {
namespace Int {
namespace Extensional {
234 template<
class IndexType>
246 void replace_and_decrease(IndexType
i, BitSetData w);
251 template<
class OldIndexType>
262 unsigned int limit(
void)
const;
264 bool empty(
void)
const;
268 unsigned int width(
void)
const;
270 void clear_mask(BitSetData* mask)
const;
272 void add_to_mask(
const BitSetData*
b, BitSetData* mask)
const;
274 template<
bool sparse>
275 void intersect_with_mask(
const BitSetData* mask);
277 void intersect_with_masks(
const BitSetData*
a,
const BitSetData*
b);
279 bool intersects(
const BitSetData*
b)
const;
281 void nand_with_mask(
const BitSetData*
b);
283 unsigned long long int ones(
void)
const;
285 unsigned long long int ones(
const BitSetData*
b)
const;
287 unsigned long long int bits(
void)
const;
289 unsigned int words(
void)
const;
291 unsigned int size(
void)
const;
298 namespace Gecode {
namespace Int {
namespace Extensional {
301 template<
unsigned int _size>
311 template<
unsigned int largersize>
314 template<
class IndexType>
317 int limit(
void)
const;
319 bool empty(
void)
const;
323 unsigned int width(
void)
const;
329 template<
bool sparse>
330 void intersect_with_mask(
const BitSetData* mask);
340 unsigned long long int ones(
void)
const;
342 unsigned long long int ones(
const BitSetData*
b)
const;
344 unsigned long long int bits(
void)
const;
346 unsigned int words(
void)
const;
348 unsigned int size(
void)
const;
355 namespace Gecode {
namespace Int {
namespace Extensional {
361 template<
class View,
bool pos>
387 const Range* fst(
void)
const;
389 const Range* lst(
void)
const;
421 void operator ++(
void);
423 bool operator ()(
void)
const;
449 void operator ++(
void);
451 bool operator ()(
void)
const;
458 bool all(
void)
const;
461 bool atmostone(
void)
const;
475 template<
class Table>
478 template<
class Table>
479 bool full(
const Table& table)
const;
481 const Range*
range(CTAdvisor&
a,
int n);
503 template<
class View,
class Table>
540 bool single(CTAdvisor&
a)
const;
542 void touched(CTAdvisor&
a);
546 void propagating(
void);
553 bool empty(
void)
const;
555 template<
class TableProp>
593 template<
class View,
class Table>
610 template<
class TableProp>
635 template<
class View,
class Table,
class CtrlView, ReifyMode rm>
655 template<
class TableProp>
676 template<
class View,
class CtrlView, ReifyMode rm>
ExecStatus postnegcompact(Home home, ViewArray< View > &x, const TupleSet &ts)
Post function for compact table propagator.
bool empty(void) const
Test whether actor link is empty (points to itself)
IndexRange i_ch
Index range with in-degree modifications.
TupleSet::Range Range
Range type for supports.
ptrdiff_t s
A tagged pointer for storing the status.
TupleSet ts
The tuple set.
Compact< View, false >::CTAdvisor CTAdvisor
void audit(void)
Perform consistency check on data structures.
const unsigned int n_words
Number of words.
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)
CtrlView b
Boolean control view.
const BitSetData * s
The lost value's support.
Table table
Current table.
StateIdx n_states
Number of states used by outgoing edges.
Iterator over valid supports.
unsigned int n_states
Total number of states.
ViewArray< View > y
The views (for rewriting)
const Range * _fst
First range of support data structure.
Compact< View, false >::CTAdvisor CTAdvisor
int * Tuple
Type of a tuple.
Compact< View, true >::LostSupports LostSupports
StateIdx i_state
Number of in-state.
Domain consistent positive extensional propagator.
Base-class for propagators.
Iterator over lost supports.
Gecode::Support::BitSetData BitSetData
Import type.
Table table
Current table.
Advisor storing a single view
Support information for a value
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.
const unsigned int n_words
Number of words.
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.
Compact< View, false >::ValidSupports ValidSupports
Compact< View, false >::Range Range
StateIdx o_state
Number of out-state.
Deterministic finite automaton (DFA)
int p
Number of positive literals for node type.
StatusType
Type of status.
::Gecode::TupleSet::Tuple Tuple
Import tuple type.
Council< CTAdvisor > c
The advisor council.
Support * support
Supported values.
Gecode::IntArgs i({1, 2, 3, 4})
Range approximation of which positions have changed.
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.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
void range(Home home, const IntVarArgs &x, SetVar y, SetVar z)
Post constraint .
const unsigned int n_words
Number of words in supports.
Domain consistent reified extensional propagator.
size_t size
The size of the propagator (used during subsumption)
Layer * layers
The layers of the graph.
ExecStatus postposcompact(Home home, ViewArray< View > &x, const TupleSet &ts)
Post function for positive compact table propagator.
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.
IndexType * _index
Indices.
const Range * r
Range information.
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.
Domain consistent layered graph (regular) propagator.
Class represeting a set of tuples.
const Range * lst
The last range.
static ExecStatus post(Home home, const VarArgArray< Var > &x, const DFA &dfa)
Post propagator on views x and DFA dfa.
const Range * _lst
Last range of support data structure.
Generic domain change information to be supplied to advisors.
Advisors for views (by position in array)
Compact< View, false >::Range Range
Compact< View, true >::CTAdvisor CTAdvisor
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Advisor for updating current table.
ViewRanges< View > xr
Range iterator.
Post propagator for SetVar x
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Edge * edges
Supporting edges in layered graph.
Domain consistent negative extensional propagator.
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.
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)
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.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
Table table
Current table.
const Range * sr
Support iterator.
Status status
Propagator status.
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.
Compact< View, true >::ValidSupports ValidSupports
Compact< View, true >::Range Range
unsigned int n_edges
Total number of edges.
ExecStatus postrecompact(Home home, ViewArray< View > &x, const TupleSet &ts, CtrlView b)
Post function for compact table propagator.
Gecode::Support::IntTypeTraits< Val >::utype ValSize
Type for support size.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
const BitSetData * s
The value's support.
const Range * lst
Last range.
Compact< View, false >::ValidSupports ValidSupports
int i
The position of the view in the view array.