compact.hpp
Go to the documentation of this file.
574 }
friend FloatVal max(const FloatVal &x, const FloatVal &y)
Definition val.hpp:387
friend FloatVal min(const FloatVal &x, const FloatVal &y)
Definition val.hpp:399
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
Definition core.hpp:3373
static Actor * copy(Space &home, Source &source)
Definition compact.hpp:200
Optional variable index stored by a compact-table advisor.
Definition extensional.hh:413
Advisor shared by compact-table support representations.
Definition extensional.hh:440
const Range * fst(void) const
Return first range of support data structure.
Definition compact.hpp:123
CompactAdvisor(Space &home, Propagator &p, Council< CompactAdvisor > &c, const TupleSet &ts, View x, int i)
Initialize from parameters.
Definition compact.hpp:101
const CSupportWord * support_end
Definition compact.hpp:1435
bool valid
Definition compact.hpp:1436
void find(void)
Definition compact.hpp:1437
int last_value
Definition compact.hpp:1433
void operator++(void)
Definition compact.hpp:1472
bool operator()(void) const
Definition compact.hpp:1476
const CSupportWord * support_begin
Definition compact.hpp:1434
CompressedSupport support(void) const
Definition compact.hpp:1479
const Range * support_range
Definition compact.hpp:1430
const CompactCompressed< View, pos > & propagator
Definition compact.hpp:1428
const Range * last_support_range
Definition compact.hpp:1431
CTAdvisor & advisor
Definition compact.hpp:1429
int value
Definition compact.hpp:1432
LostSupports(const CompactCompressed< View, pos > &p0, CTAdvisor &a0, int first_value, int last_value0)
Definition compact.hpp:1463
int val(void) const
Definition compact.hpp:1418
const TupleSet & tuple_set
Definition compact.hpp:1347
CompressedSupport support(void) const
Definition compact.hpp:1421
const CSupportWord * support_end
Definition compact.hpp:1354
void find(void)
Definition compact.hpp:1356
ViewRanges< View > view_ranges
Definition compact.hpp:1348
void operator++(void)
Definition compact.hpp:1411
ValidSupports(const CompactCompressed< View, pos > &p, CTAdvisor &a)
Definition compact.hpp:1392
const CSupportWord * support_begin
Definition compact.hpp:1353
int variable
Definition compact.hpp:1349
const Range * support_range
Definition compact.hpp:1350
ValidSupports(const TupleSet &ts0, int i0, View x)
Definition compact.hpp:1401
int value
Definition compact.hpp:1352
const Range * last_support_range
Definition compact.hpp:1351
bool valid
Definition compact.hpp:1355
bool operator()(void) const
Definition compact.hpp:1415
CompactCompressed(Home home, const TupleSet &ts0)
Definition compact.hpp:1500
virtual PropCost cost(const Space &, const ModEventDelta &) const
Cost function.
Definition compact.hpp:1526
const unsigned int n_words
Definition compact.hpp:1492
bool full(const Table &table) const
Definition compact.hpp:1521
bool atmostone(void) const
Definition compact.hpp:1487
TupleSet::CSupportWord CSupportWord
Definition compact.hpp:1342
Council< CTAdvisor > c
Definition compact.hpp:1494
CompactAdvisor< View, pos, true > CTAdvisor
Definition compact.hpp:1343
CompactCompressed(Space &home, CompactCompressed &p)
Definition compact.hpp:1496
CompressedSupport supports(CTAdvisor &a, int n) const
Definition compact.hpp:1505
void setup(Space &home, Table &table, ViewArray< View > &x)
Definition compact.hpp:1515
Touched-advisor status shared by positive compact-table propagators.
Definition extensional.hh:470
static bool empty(const CompressedSupport &support)
Definition compact.hpp:345
static void intersect(Table &table, const CompressedSupport &support)
Definition compact.hpp:349
static bool empty(const BitSetData *support)
Definition compact.hpp:333
static void intersect(Table &table, const BitSetData *support)
Definition compact.hpp:337
LostSupports(const Compact< View, pos > &p, CTAdvisor &a, int first_value, int last_value)
Initialize iterator for values between first_value and last_value.
Definition compact.hpp:553
ValidSupports(const Compact< View, pos > &p, CTAdvisor &a)
Initialize from initialized propagator.
Definition compact.hpp:469
const BitSetData * supports(CTAdvisor &a, int n)
Return supports for value n.
Definition compact.hpp:405
CompactAdvisor< View, pos, false > CTAdvisor
Advisor for updating current table.
Definition extensional.hh:515
bool full(const Table &table) const
Check whether the table covers the whole Cartedion product.
Definition compact.hpp:625
void setup(Space &home, Table &table, ViewArray< View > &x)
Setup the actual table.
Definition compact.hpp:617
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition compact.hpp:631
Compressed tuple-word support list.
Definition extensional.hh:53
Shared implementation of negative compact-table propagation.
Definition compact.hpp:782
static ExecStatus propagate(Actor &actor, Space &home)
Definition compact.hpp:788
static ExecStatus advise(Actor &actor, Space &home, Advisor &advisor0)
Definition compact.hpp:857
static void reschedule(Actor &actor, Space &home)
Definition compact.hpp:784
NegCompactCompressed(Home home, ViewArray< View > &x, const TupleSet &ts)
Definition compact.hpp:1660
virtual ExecStatus propagate(Space &home, const ModEventDelta &)
Propagation function.
Definition compact.hpp:1684
Base::ValidSupports ValidSupports
Definition compact.hpp:1645
void setup(Space &home, Table &table, ViewArray< View > &x)
Definition compact.hpp:1515
virtual ExecStatus advise(Space &home, Advisor &advisor, const Delta &)
Advise function.
Definition compact.hpp:1688
CompactCompressed< View, false > Base
Definition compact.hpp:1644
Base::CTAdvisor CTAdvisor
Definition compact.hpp:1646
friend class NegCompactAlgorithm
Definition compact.hpp:1641
NegCompactCompressed(Space &home, TableProp &p)
Definition compact.hpp:1658
static ExecStatus post(Home home, ViewArray< View > &x, const TupleSet &ts)
Definition compact.hpp:1670
Domain consistent negative extensional propagator.
Definition extensional.hh:697
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition compact.hpp:1132
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition compact.hpp:1126
static ExecStatus post(Home home, ViewArray< View > &x, const TupleSet &ts)
Post propagator for views x and table t.
Definition compact.hpp:1105
Shared implementation of positive compact-table propagation.
Definition compact.hpp:646
static void reschedule(Actor &actor, Space &home)
Definition compact.hpp:648
static ExecStatus advise(Actor &actor, Space &home, Advisor &advisor0, const Delta &delta)
Definition compact.hpp:709
static ExecStatus propagate(Actor &actor, Space &home)
Definition compact.hpp:654
Status::StatusType StatusType
Definition compact.hpp:1556
Base::LostSupports LostSupports
Definition compact.hpp:1546
PosCompactCompressed(Space &home, TableProp &p)
Definition compact.hpp:1562
CompactCompressed< View, true > Base
Definition compact.hpp:1543
PosCompactCompressed(Home home, ViewArray< View > &x, const TupleSet &ts)
Definition compact.hpp:1567
static ExecStatus post(Home home, ViewArray< View > &x, const TupleSet &ts)
Definition compact.hpp:1578
Base::CTAdvisor CTAdvisor
Definition compact.hpp:1545
void setup(Space &home, Table &table, ViewArray< View > &x)
Definition compact.hpp:1515
friend class PosCompactAlgorithm
Definition compact.hpp:1540
Base::ValidSupports ValidSupports
Definition compact.hpp:1544
virtual ExecStatus propagate(Space &home, const ModEventDelta &)
Propagation function.
Definition compact.hpp:1593
CompactStatus< CTAdvisor > Status
Definition compact.hpp:1555
virtual ExecStatus advise(Space &home, Advisor &advisor, const Delta &delta)
Advise function.
Definition compact.hpp:1597
Domain consistent positive extensional propagator.
Definition extensional.hh:627
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition compact.hpp:1024
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition compact.hpp:1018
static ExecStatus post(Home home, ViewArray< View > &x, const TupleSet &ts)
Post propagator for views x and table t.
Definition compact.hpp:997
static Actor * copy(Space &home, Source &source)
Definition compact.hpp:210
Shared implementation of reified compact-table propagation.
Definition compact.hpp:895
static ExecStatus propagate(Actor &actor, Space &home)
Definition compact.hpp:901
static ExecStatus advise(Actor &actor, Space &home, Advisor &advisor0)
Definition compact.hpp:928
static void reschedule(Actor &actor, Space &home)
Definition compact.hpp:897
ReCompactCompressed(Space &home, TableProp &p)
Definition compact.hpp:1750
static ExecStatus post(Home home, ViewArray< View > &x, const TupleSet &ts, CtrlView b)
Definition compact.hpp:1768
static ExecStatus post_neg(Home home, ViewArray< View > &x, const TupleSet &ts)
Definition compact.hpp:1789
CompactCompressed< View, false > Base
Definition compact.hpp:1735
static ExecStatus post_pos(Home home, ViewArray< View > &x, const TupleSet &ts)
Definition compact.hpp:1784
void setup(Space &home, Table &table, ViewArray< View > &x)
Definition compact.hpp:1515
Base::ValidSupports ValidSupports
Definition compact.hpp:1736
Base::CTAdvisor CTAdvisor
Definition compact.hpp:1737
virtual ExecStatus propagate(Space &home, const ModEventDelta &)
Propagation function.
Definition compact.hpp:1804
ReCompactCompressed(Home home, ViewArray< View > &x, const TupleSet &ts, CtrlView b0)
Definition compact.hpp:1755
virtual ExecStatus advise(Space &home, Advisor &advisor, const Delta &)
Advise function.
Definition compact.hpp:1808
friend class ReCompactAlgorithm
Definition compact.hpp:1731
static constexpr ReifyMode mode
Definition compact.hpp:1734
Domain consistent reified extensional propagator.
Definition extensional.hh:745
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition compact.hpp:1271
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition compact.hpp:1264
static ExecStatus post(Home home, ViewArray< View > &x, const TupleSet &ts, CtrlView b)
Post propagator for views x and table t.
Definition compact.hpp:1217
static ExecStatus post_neg(Home home, ViewArray< View > &x, const TupleSet &ts)
Definition compact.hpp:1243
static ExecStatus post_pos(Home home, ViewArray< View > &x, const TupleSet &ts)
Definition compact.hpp:1236
static bool dense_compressed_support(const TupleSet &ts, int p, int n, const TupleSet::CSupportWord *&b, const TupleSet::CSupportWord *&e)
Return compressed support words for position/value.
Definition tuple-set.hpp:412
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
Definition core.hpp:5071
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
Definition region.hpp:386
Compressed support data for one tuple-word block.
Definition int.hh:2832
const BitSetData * supports(unsigned int n_words, int n) const
Return the dense supports for value n.
Definition tuple-set.hpp:50
ViewAdvisor(Space &home, Propagator &p, Council< A > &c, View x0)
Constructor for creation.
Definition advisor.hpp:66
ExecStatus ES_NOFIX_DISPOSE(Council< A > &c, A &a)
Advisor a must be disposed and its propagator must be run
Definition core.hpp:4121
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
Definition core.hpp:4321
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Definition macros.hpp:52
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
Definition macros.hpp:116
void product(Home home, const IntVarArgs &x, IntVar y, IntPropLevel ipl=IPL_DEF)
Constrain y to the exact product of the variables in x.
Definition arithmetic.cpp:377
PropCost compact_cost(const Council< Advisor > &council)
Definition compact.hpp:318
ExecStatus postnegcompact(Home home, ViewArray< View > &x, const TupleSet &ts)
Post function for compact table propagator.
Definition compact.hpp:1143
void compact_intersect(Table &table, const Support &support)
Definition compact.hpp:362
bool compact_atmostone(const Council< Advisor > &council)
Definition compact.hpp:266
ExecStatus postposcompact(Home home, ViewArray< View > &x, const TupleSet &ts)
Post function for positive compact table propagator.
Definition compact.hpp:1034
ExecStatus postrecompact(Home home, ViewArray< View > &x, const TupleSet &ts, CtrlView b)
Post function for compact table propagator.
Definition compact.hpp:1281
bool compact_support_empty(const Support &support)
Definition compact.hpp:356
bool compact_all(const Council< Advisor > &council)
Definition compact.hpp:259
ExecStatus postposcompact_compressed(Home home, ViewArray< View > &x, const TupleSet &ts)
Post function for positive compact table with compressed supports.
Definition compact.hpp:1606
bool compact_full(const Council< Advisor > &council, const Table &table)
Definition compact.hpp:305
Actor * compact_copy(Space &home, Source &source)
Definition compact.hpp:217
void compact_setup(Space &home, Propagator &propagator, Council< Advisor > &council, const TupleSet &ts, Table &table, ViewArray< View > &x)
Definition compact.hpp:276
ExecStatus postnegcompact_compressed(Home home, ViewArray< View > &x, const TupleSet &ts)
Post function for negative compact table with compressed supports.
Definition compact.hpp:1696
ExecStatus postrecompact_compressed(Home home, ViewArray< View > &x, const TupleSet &ts, CtrlView b)
Post function for reified compact table with compressed supports.
Definition compact.hpp:1816
const Gecode::ModEvent ME_INT_BND
Domain operation has changed the minimum or maximum of the domain.
Definition var-type.hpp:73
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value).
Definition var-type.hpp:134
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable).
Definition var-type.hpp:64
bool disjoint(I &i, J &j)
Check whether range iterators i and j are disjoint.
Definition ranges-operations.hpp:112
Support algorithms and datastructures
std::make_unsigned_t< ptrdiff_t > uptrint_t
Unsigned integer for pointer encodings.
Definition int-type.hpp:53
Gecode toplevel namespace
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:67
void range(Home home, const IntVarArgs &x, SetVar y, SetVar z)
Post constraint .
Definition aliases.hpp:158
void values(Home home, const IntVarArgs &x, IntSet y, IntPropLevel ipl=IPL_DEF)
Post constraint .
Definition aliases.hpp:143
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
Definition filter.cpp:138
TFE propagator(PropagatorGroup g)
Only propagators (but not post functions) from g are considered.
Definition filter.cpp:131
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:49
