Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
Gecode::Set Namespace Reference

Finite integer sets. More...

Namespaces

namespace  Branch
 Set branchings
 
namespace  Channel
 Channeling propagators for set variables.
 
namespace  Convex
 Propagators for convexity.
 
namespace  Distinct
 Propagators for global distinctness constraints.
 
namespace  Element
 Set element propagators
 
namespace  Int
 Propagators connecting set and int variables.
 
namespace  LDSB
 Symmetry breaking for set variables.
 
namespace  Limits
 Numerical limits for set variables.
 
namespace  Precede
 Value precedence propagators.
 
namespace  Rel
 Standard set relation propagators.
 
namespace  RelOp
 Standard set operation propagators.
 
namespace  Sequence
 Propagators for ordered sequences of sets.
 

Classes

class  ArgumentSizeMismatch
 Exception: Arguments are of different size More...
 
class  ArrayRanges
 Range iterator for a two-dimensional array More...
 
class  BndSet
 Sets of integers. More...
 
class  BndSetRanges
 Range iterator for integer sets. More...
 
class  CachedView
 Cached set view. More...
 
class  ComplementView
 Complement set view. More...
 
class  ConstSetView
 Constant view. More...
 
class  EmptyView
 Constant view for the empty set. More...
 
class  GlbDiffRanges
 Range iterator for difference of greatest lower bound and cache More...
 
class  GLBndSet
 Growing sets of integers. More...
 
class  GlbRanges
 Range iterator for the greatest lower bound. More...
 
class  GlbRanges< CachedView< View > >
 Range iterator for greatest lower bound of cached set views More...
 
class  GlbRanges< ComplementView< ComplementView< View > > >
 Range iterator for the greatest lower bound of double-complement-views. More...
 
class  GlbRanges< ComplementView< View > >
 Range iterator for greatest lower bound of complement set views More...
 
class  GlbRanges< ConstSetView >
 Range iterator for greatest lower bound of constant set view More...
 
class  GlbRanges< EmptyView >
 Range iterator for greatest lower bound of constantly empty set view More...
 
class  GlbRanges< SetVarImp * >
 Range iterator for the greatest lower bound of a set variable implementation. More...
 
class  GlbRanges< SetView >
 Range iterator for greatest lower bound of set variable views More...
 
class  GlbRanges< SingletonView >
 Range iterator for greatest lower bound of singleton set view More...
 
class  GlbRanges< UniverseView >
 Range iterator for greatest lower bound of constant universe set view More...
 
class  IllegalOperation
 Exception: Illegal operation passed as argument More...
 
class  LubDiffRanges
 Range iterator for difference of least upper bound and cache More...
 
class  LUBndSet
 Shrinking sets of integers. More...
 
class  LubRanges
 Range iterator for the least upper bound. More...
 
class  LubRanges< CachedView< View > >
 Range iterator for least upper bound of cached set views More...
 
class  LubRanges< ComplementView< ComplementView< View > > >
 Range iterator for the least upper bound of double-complement-views. More...
 
class  LubRanges< ComplementView< View > >
 Range iterator for least upper bound of complement set views More...
 
class  LubRanges< ConstSetView >
 Range iterator for least upper bound of constant set view More...
 
class  LubRanges< EmptyView >
 Range iterator for least upper bound of constantly empty set view More...
 
class  LubRanges< SetVarImp * >
 Range iterator for the least upper bound of a set variable implementation. More...
 
class  LubRanges< SetView >
 Range iterator for least upper bound of set variable views More...
 
class  LubRanges< SingletonView >
 Range iterator for least upper bound of singleton set view More...
 
class  LubRanges< UniverseView >
 Range iterator for least upper bound of constant universe set view More...
 
class  OutOfLimits
 Exception: Value out of limits More...
 
class  RangesCompl
 A complement iterator spezialized for the BndSet limits. More...
 
class  Relax
 Class for posting equalities for non-relaxed variables. More...
 
class  SetDelta
 Finite set delta information for advisors. More...
 
class  SetTraceView
 Duplicate of a set view. More...
 
class  SetVarImp
 Finite integer set variable implementation. More...
 
class  SetVarImpBase
 Base-class for Set-variable implementations. More...
 
class  SetVarImpConf
 Configuration for Set-variable implementations. More...
 
class  SetView
 Set view for set variables More...
 
class  SingletonView
 Singleton set view. More...
 
class  TooFewArguments
 Exception: No arguments available in argument array More...
 
class  UniverseView
 Constant view for the universe. More...
 
class  UnknownBranching
 Exception: Unknown value or variable selection passed as argument More...
 
class  UnknownOperation
 Exception: Unknown operation type passed as argument More...
 
class  UnknownRanges
 Range iterator for the unknown set. More...
 
class  UnknownRelation
 Exception: Unknown relation type passed as argument More...
 
class  VariableEmptyDomain
 Exception: Variable created with empty domain More...
 

Functions

template<class View0 , class View1 >
void rel_post (Home home, View0 x0, SetRelType r, View1 x1)
 
template<class View0 , class View1 , ReifyMode rm>
void rel_re (Home home, View0 x, SetRelType r, View1 y, BoolVar b)
 
bool operator== (const ConstSetView &, const ConstSetView &)
 
bool operator!= (const ConstSetView &, const ConstSetView &)
 
template<class Char , class Traits , class View >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const CachedView< View > &x)
 
template<class View >
bool operator== (const CachedView< View > &x, const CachedView< View > &y)
 
template<class View >
bool operator!= (const CachedView< View > &x, const CachedView< View > &y)
 
template<class Char , class Traits , class View >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const ComplementView< View > &x)
 
template<class View >
bool operator== (const ComplementView< View > &x, const ComplementView< View > &y)
 
template<class View >
bool operator!= (const ComplementView< View > &x, const ComplementView< View > &y)
 
bool operator== (const EmptyView &, const EmptyView &)
 
bool operator!= (const EmptyView &, const EmptyView &)
 
bool operator== (const UniverseView &, const UniverseView &)
 
bool operator!= (const UniverseView &, const UniverseView &)
 
template<class Char , class Traits , class I >
void printBound (std::basic_ostream< Char, Traits > &s, I &r)
 Print bound of a set view or variable.
 
template<class Char , class Traits , class IL , class IU >
void print (std::basic_ostream< Char, Traits > &s, bool assigned, IL &lb, IU &ub, unsigned int cardMin, unsigned int cardMax)
 Print set view.
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const SetView &x)
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const EmptyView &)
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const UniverseView &)
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const ConstSetView &x)
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const SingletonView &x)
 
bool operator== (const SingletonView &x, const SingletonView &y)
 
bool operator!= (const SingletonView &x, const SingletonView &y)
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const SetView &x)
 Print set variable view.
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const ConstSetView &x)
 Print constant set view.
 

Variables

const Gecode::ModEvent ME_SET_FAILED = Gecode::ME_GEN_FAILED
 Domain operation has resulted in failure.
 
const Gecode::ModEvent ME_SET_NONE = Gecode::ME_GEN_NONE
 Domain operation has not changed domain.
 
const Gecode::ModEvent ME_SET_VAL = Gecode::ME_GEN_ASSIGNED
 Domain operation has resulted in a value (assigned variable)
 
const Gecode::ModEvent ME_SET_CARD = Gecode::ME_GEN_ASSIGNED + 1
 Domain operation has changed the variable cardinality.
 
const Gecode::ModEvent ME_SET_LUB = Gecode::ME_GEN_ASSIGNED + 2
 Domain operation has changed the least upper bound.
 
const Gecode::ModEvent ME_SET_GLB = Gecode::ME_GEN_ASSIGNED + 3
 Domain operation has changed the greatest lower bound.
 
const Gecode::ModEvent ME_SET_BB = Gecode::ME_GEN_ASSIGNED + 4
 Domain operation has changed both greatest lower and least upper bound.
 
const Gecode::ModEvent ME_SET_CLUB = Gecode::ME_GEN_ASSIGNED + 5
 Domain operation has changed the least upper bound and the cardinality.
 
const Gecode::ModEvent ME_SET_CGLB = Gecode::ME_GEN_ASSIGNED + 6
 Domain operation has changed the greatest lower bound and the cardinality.
 
const Gecode::ModEvent ME_SET_CBB = Gecode::ME_GEN_ASSIGNED + 7
 Domain operation has changed both the greatest lower bound and the least upper bound, as well as the cardinality.
 
const Gecode::PropCond PC_SET_NONE = Gecode::PC_GEN_NONE
 Propagation condition to be ignored (convenience)
 
const Gecode::PropCond PC_SET_VAL = Gecode::PC_GEN_ASSIGNED
 Propagate when a view becomes assigned (single value)
 
const Gecode::PropCond PC_SET_CARD = Gecode::PC_GEN_ASSIGNED + 1
 Propagate when the cardinality of a view changes.
 
const Gecode::PropCond PC_SET_CLUB = Gecode::PC_GEN_ASSIGNED + 2
 Propagate when the cardinality or the least upper bound of a view changes.
 
const Gecode::PropCond PC_SET_CGLB = Gecode::PC_GEN_ASSIGNED + 3
 Propagate when the cardinality or the greatest lower bound of a view changes.
 
const Gecode::PropCond PC_SET_ANY = Gecode::PC_GEN_ASSIGNED + 4
 Propagate when any bound or the cardinality of a view changes.
 

View comparison

bool operator== (const ConstSetView &x, const ConstSetView &y)
 Test whether views x and y are the same.
 
bool operator!= (const ConstSetView &x, const ConstSetView &y)
 Test whether views x and y are not the same.
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const EmptyView &x)
 Print empty set view.
 
bool operator== (const EmptyView &x, const EmptyView &y)
 Test whether views x and y are the same.
 
bool operator!= (const EmptyView &x, const EmptyView &y)
 Test whether views x and y are the same.
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const UniverseView &x)
 Print universe set view.
 
bool operator== (const UniverseView &x, const UniverseView &y)
 Test whether views x and y are the same.
 
bool operator!= (const UniverseView &x, const UniverseView &y)
 Test whether views x and y are the not same.
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const SingletonView &x)
 Print singleton set view.
 
bool operator== (const SingletonView &x, const SingletonView &y)
 Test whether views x and y are the same.
 
bool operator!= (const SingletonView &x, const SingletonView &y)
 Test whether views x and y are the not same.
 
template<class Char , class Traits , class View >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const ComplementView< View > &x)
 Print complement set view.
 
template<class View >
bool operator== (const ComplementView< View > &x, const ComplementView< View > &y)
 Test whether views x and y are the same.
 
template<class View >
bool operator!= (const ComplementView< View > &x, const ComplementView< View > &y)
 Test whether views x and y are the not same.
 
template<class Char , class Traits , class View >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const CachedView< View > &x)
 Print cached set view.
 
template<class View >
bool operator== (const CachedView< View > &x, const CachedView< View > &y)
 Test whether views x and y are the same.
 
template<class View >
bool operator!= (const CachedView< View > &x, const CachedView< View > &y)
 Test whether views x and y are the not same.
 

Detailed Description

Finite integer sets.

The Gecode::Set namespace contains all functionality required to program propagators and branchers for finite integer sets. In addition, all propagators and branchers for finite integer sets provided by Gecode are contained as nested namespaces.

Function Documentation

◆ rel_post()

template<class View0 , class View1 >
void Gecode::Set::rel_post ( Home home,
View0 x0,
SetRelType r,
View1 x1 )
inline

Definition at line 45 of file rel.cpp.

◆ rel_re()

template<class View0 , class View1 , ReifyMode rm>
void Gecode::Set::rel_re ( Home home,
View0 x,
SetRelType r,
View1 y,
BoolVar b )
inline

Definition at line 95 of file rel.cpp.

◆ operator==() [1/12]

bool Gecode::Set::operator== ( const ConstSetView & x,
const ConstSetView & y )
related

Definition at line 707 of file const.hpp.

◆ operator!=() [1/12]

bool Gecode::Set::operator!= ( const ConstSetView & x,
const ConstSetView & y )
related

Definition at line 717 of file const.hpp.

◆ operator<<() [1/14]

template<class Char , class Traits , class View >
std::basic_ostream< Char, Traits > & Gecode::Set::operator<< ( std::basic_ostream< Char, Traits > & os,
const CachedView< View > & x )
related

Definition at line 368 of file cached.hpp.

◆ operator==() [2/12]

template<class View >
bool Gecode::Set::operator== ( const CachedView< View > & x,
const CachedView< View > & y )
related

Definition at line 381 of file cached.hpp.

◆ operator!=() [2/12]

template<class View >
bool Gecode::Set::operator!= ( const CachedView< View > & x,
const CachedView< View > & y )
related

Definition at line 387 of file cached.hpp.

◆ operator<<() [2/14]

template<class Char , class Traits , class View >
std::basic_ostream< Char, Traits > & Gecode::Set::operator<< ( std::basic_ostream< Char, Traits > & os,
const ComplementView< View > & x )
related

Definition at line 535 of file complement.hpp.

◆ operator==() [3/12]

template<class View >
bool Gecode::Set::operator== ( const ComplementView< View > & x,
const ComplementView< View > & y )
related

Definition at line 553 of file complement.hpp.

◆ operator!=() [3/12]

template<class View >
bool Gecode::Set::operator!= ( const ComplementView< View > & x,
const ComplementView< View > & y )
related

Definition at line 559 of file complement.hpp.

◆ operator==() [4/12]

bool Gecode::Set::operator== ( const EmptyView & ,
const EmptyView &  )
related

Definition at line 723 of file const.hpp.

◆ operator!=() [4/12]

bool Gecode::Set::operator!= ( const EmptyView & ,
const EmptyView &  )
related

Definition at line 727 of file const.hpp.

◆ operator==() [5/12]

bool Gecode::Set::operator== ( const UniverseView & ,
const UniverseView &  )
related

Definition at line 732 of file const.hpp.

◆ operator!=() [5/12]

bool Gecode::Set::operator!= ( const UniverseView & ,
const UniverseView &  )
related

Definition at line 736 of file const.hpp.

◆ printBound()

template<class Char , class Traits , class I >
void Gecode::Set::printBound ( std::basic_ostream< Char, Traits > & s,
I & r )

Print bound of a set view or variable.

Definition at line 43 of file print.hpp.

◆ print()

template<class Char , class Traits , class IL , class IU >
void Gecode::Set::print ( std::basic_ostream< Char, Traits > & s,
bool assigned,
IL & lb,
IU & ub,
unsigned int cardMin,
unsigned int cardMax )

Print set view.

Definition at line 63 of file print.hpp.

◆ operator<<() [3/14]

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & Gecode::Set::operator<< ( std::basic_ostream< Char, Traits > & os,
const SetView & x )
related

Definition at line 63 of file print.hpp.

◆ operator<<() [4/14]

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & Gecode::Set::operator<< ( std::basic_ostream< Char, Traits > & os,
const EmptyView &  )
related

Definition at line 63 of file print.hpp.

◆ operator<<() [5/14]

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & Gecode::Set::operator<< ( std::basic_ostream< Char, Traits > & os,
const UniverseView &  )
related

Definition at line 63 of file print.hpp.

◆ operator<<() [6/14]

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & Gecode::Set::operator<< ( std::basic_ostream< Char, Traits > & os,
const ConstSetView & x )
related

Definition at line 63 of file print.hpp.

◆ operator<<() [7/14]

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & Gecode::Set::operator<< ( std::basic_ostream< Char, Traits > & os,
const SingletonView & x )
related

Definition at line 63 of file print.hpp.

◆ operator==() [6/12]

bool Gecode::Set::operator== ( const SingletonView & x,
const SingletonView & y )
related

Definition at line 295 of file singleton.hpp.

◆ operator!=() [6/12]

bool Gecode::Set::operator!= ( const SingletonView & x,
const SingletonView & y )
related

Definition at line 300 of file singleton.hpp.

Variable Documentation

◆ ME_SET_FAILED

const Gecode::ModEvent Gecode::Set::ME_SET_FAILED = Gecode::ME_GEN_FAILED

Domain operation has resulted in failure.

Definition at line 138 of file var-type.hpp.

◆ ME_SET_NONE

const Gecode::ModEvent Gecode::Set::ME_SET_NONE = Gecode::ME_GEN_NONE

Domain operation has not changed domain.

Definition at line 140 of file var-type.hpp.

◆ ME_SET_VAL

const Gecode::ModEvent Gecode::Set::ME_SET_VAL = Gecode::ME_GEN_ASSIGNED

Domain operation has resulted in a value (assigned variable)

Definition at line 142 of file var-type.hpp.

◆ ME_SET_CARD

const Gecode::ModEvent Gecode::Set::ME_SET_CARD = Gecode::ME_GEN_ASSIGNED + 1

Domain operation has changed the variable cardinality.

Note that this implies that the domain has not resulted in a value.

Definition at line 148 of file var-type.hpp.

◆ ME_SET_LUB

const Gecode::ModEvent Gecode::Set::ME_SET_LUB = Gecode::ME_GEN_ASSIGNED + 2

Domain operation has changed the least upper bound.

Note that this implies that the domain has not resulted in a value and that also neither cardinality nor the greatest lower bound have changed.

Definition at line 156 of file var-type.hpp.

◆ ME_SET_GLB

const Gecode::ModEvent Gecode::Set::ME_SET_GLB = Gecode::ME_GEN_ASSIGNED + 3

Domain operation has changed the greatest lower bound.

Note that this implies that the domain has not resulted in a value and that also neither cardinality nor the least upper bound have changed.

Definition at line 164 of file var-type.hpp.

◆ ME_SET_BB

const Gecode::ModEvent Gecode::Set::ME_SET_BB = Gecode::ME_GEN_ASSIGNED + 4

Domain operation has changed both greatest lower and least upper bound.

Note that this implies that the domain has not resulted in a value and that also the cardinality has not changed.

Definition at line 172 of file var-type.hpp.

◆ ME_SET_CLUB

const Gecode::ModEvent Gecode::Set::ME_SET_CLUB = Gecode::ME_GEN_ASSIGNED + 5

Domain operation has changed the least upper bound and the cardinality.

Note that this implies that the domain has not resulted in a value and that also the greatest lower bound has not changed.

Definition at line 179 of file var-type.hpp.

◆ ME_SET_CGLB

const Gecode::ModEvent Gecode::Set::ME_SET_CGLB = Gecode::ME_GEN_ASSIGNED + 6

Domain operation has changed the greatest lower bound and the cardinality.

Note that this implies that the domain has not resulted in a value and that also the least upper bound has not changed.

Definition at line 186 of file var-type.hpp.

◆ ME_SET_CBB

const Gecode::ModEvent Gecode::Set::ME_SET_CBB = Gecode::ME_GEN_ASSIGNED + 7

Domain operation has changed both the greatest lower bound and the least upper bound, as well as the cardinality.

Note that this implies that the domain has not resulted in a value.

If a propagator subscribes to this variable, it will be processed assuming a ME_SET_CBB modification event.

Definition at line 197 of file var-type.hpp.

◆ PC_SET_NONE

const Gecode::PropCond Gecode::Set::PC_SET_NONE = Gecode::PC_GEN_NONE

Propagation condition to be ignored (convenience)

Definition at line 199 of file var-type.hpp.

◆ PC_SET_VAL

const Gecode::PropCond Gecode::Set::PC_SET_VAL = Gecode::PC_GEN_ASSIGNED

Propagate when a view becomes assigned (single value)

If a propagator p depends on a view x with propagation condition PC_SET_VAL, then p is propagated when a domain update operation on x returns the modification event ME_SET_VAL.

Definition at line 207 of file var-type.hpp.

◆ PC_SET_CARD

const Gecode::PropCond Gecode::Set::PC_SET_CARD = Gecode::PC_GEN_ASSIGNED + 1

Propagate when the cardinality of a view changes.

If a propagator p depends on a view x with propagation condition PC_SET_CARD, then p is propagated when a domain update operation on x returns the modification event ME_SET_VAL, ME_SET_CARD, ME_SET_CGLB, ME_SET_CLUB, or ME_SET_CBB.

Definition at line 216 of file var-type.hpp.

◆ PC_SET_CLUB

const Gecode::PropCond Gecode::Set::PC_SET_CLUB = Gecode::PC_GEN_ASSIGNED + 2

Propagate when the cardinality or the least upper bound of a view changes.

If a propagator p depends on a view x with propagation condition PC_SET_CLUB, then p is propagated when a domain update operation on x returns the modification event ME_SET_VAL, ME_SET_LUB, ME_SET_BB, ME_SET_CARD, ME_SET_CGLB, ME_SET_CLUB, or ME_SET_CBB.

Definition at line 227 of file var-type.hpp.

◆ PC_SET_CGLB

const Gecode::PropCond Gecode::Set::PC_SET_CGLB = Gecode::PC_GEN_ASSIGNED + 3

Propagate when the cardinality or the greatest lower bound of a view changes.

If a propagator p depends on a view x with propagation condition PC_SET_CGLB, then p is propagated when a domain update operation on x returns the modification event ME_SET_VAL, ME_SET_GLB, ME_SET_BB, ME_SET_CARD, ME_SET_CGLB, ME_SET_CLUB, or ME_SET_CBB.

Definition at line 238 of file var-type.hpp.

◆ PC_SET_ANY

const Gecode::PropCond Gecode::Set::PC_SET_ANY = Gecode::PC_GEN_ASSIGNED + 4

Propagate when any bound or the cardinality of a view changes.

If a propagator p depends on a view x with propagation condition PC_SET_ANY, then p is propagated when a domain update operation on x returns any modification event but ME_SET_FAILED and ME_SET_NONE.

Definition at line 248 of file var-type.hpp.