42 #ifndef __GECODE_INT_EXTENSIONAL_HH__ 43 #define __GECODE_INT_EXTENSIONAL_HH__ 54 namespace Gecode {
namespace Int {
namespace Extensional {
70 template<
class View,
class Val,
class Degree,
class StateIdx>
118 bool operator ()(
void)
const;
120 void operator ++(
void);
151 bool empty(
void)
const;
228 namespace Gecode {
namespace Int {
namespace Extensional {
239 template<
class IndexType>
251 void replace_and_decrease(IndexType
i, BitSetData w);
256 template<
class OldIndexType>
267 unsigned int limit(
void)
const;
269 bool empty(
void)
const;
271 unsigned int width(
void)
const;
273 void clear_mask(BitSetData* mask)
const;
275 void add_to_mask(
const BitSetData*
b, BitSetData* mask)
const;
277 template<
bool sparse>
278 void intersect_with_mask(
const BitSetData* mask);
280 void intersect_with_masks(
const BitSetData*
a,
const BitSetData*
b);
282 bool intersects(
const BitSetData*
b)
const;
284 void nand_with_mask(
const BitSetData*
b);
286 unsigned int words(
void)
const;
288 unsigned int size(
void)
const;
295 namespace Gecode {
namespace Int {
namespace Extensional {
298 template<
unsigned int _size>
308 template<
unsigned int largersize>
311 template<
class IndexType>
314 int limit(
void)
const;
316 bool empty(
void)
const;
318 unsigned int width(
void)
const;
324 template<
bool sparse>
325 void intersect_with_mask(
const BitSetData* mask);
335 unsigned int words(
void)
const;
337 unsigned int size(
void)
const;
344 namespace Gecode {
namespace Int {
namespace Extensional {
376 const Range* fst(
void)
const;
378 const Range* lst(
void)
const;
410 void propagating(
void);
436 void operator ++(
void);
438 bool operator ()(
void)
const;
462 void operator ++(
void);
464 bool operator ()(
void)
const;
506 template<
class View,
class Table>
525 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.