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

Shrinking sets of integers. More...

#include <var-imp.hpp>

Update operations

bool exclude (Space &home, int i, int j, SetDelta &d)
 Exclude the set $\{i,\dots,j\}$ from this set.
 
bool intersect (Space &home, int i, int j)
 Intersect this set with the set $\{i,\dots,j\}$.
 
template<class I >
bool intersectI (Space &home, I &i)
 Exclude all elements not in the set represented by i from this set.
 
template<class I >
bool excludeI (Space &home, I &i)
 Exclude all elements in the set represented by i from this set.
 
void excludeAll (Space &home)
 Exclude all elements from this set.
 

Constructors and initialization

 LUBndSet (void)
 Default constructor. Creates an empty set.
 
 LUBndSet (Space &home)
 Initialize as the full set including everything between Limits::min and Limits::max.
 
 LUBndSet (Space &home, int i, int j)
 Initialize as the set $ \{i,\dots,j\}$.
 
 LUBndSet (Space &home, const IntSet &s)
 Initialize as the set represented by s.
 
void init (Space &home)
 Initialize as the full set including everything between Limits::min and Limits::max.
 

Additional Inherited Members

- Public Member Functions inherited from Gecode::Set::BndSet
RangeListranges (void) const
 Return range list for iteration.
 
 BndSet (void)
 Default constructor. Creates an empty set.
 
 BndSet (Space &home, int i, int j)
 Initialize as the set $ \{i,\dots,j\}$.
 
 BndSet (Space &home, const IntSet &s)
 Initialize as the set represented by s.
 
void dispose (Space &home)
 Free memory used by this set.
 
int min (void) const
 Return smallest element.
 
int max (void) const
 Return greatest element.
 
int minN (unsigned int n) const
 Return n -th smallest element.
 
unsigned int size (void) const
 Return size.
 
unsigned int card (void) const
 Return cardinality.
 
void card (unsigned int c)
 Set cardinality.
 
bool empty (void) const
 Test whether this set is empty.
 
bool in (int i) const
 Test whether i is an element of this set.
 
void become (Space &home, const BndSet &s)
 Make this set equal to s.
 
void update (Space &home, BndSet &x)
 Update this set to be a clone of set x.
 
bool isConsistent (void) const
 Check whether internal invariants hold.
 
- Static Public Attributes inherited from Gecode::Set::BndSet
static const int MAX_OF_EMPTY = Limits::min-1
 Returned by empty sets when asked for their maximum element.
 
static const int MIN_OF_EMPTY = Limits::max+1
 Returned by empty sets when asked for their minimum element.
 
- Protected Member Functions inherited from Gecode::Set::BndSet
void fst (RangeList *r)
 Set first range to r.
 
void lst (RangeList *r)
 Set last range to r.
 
RangeListfst (void) const
 Return first range.
 
RangeListlst (void) const
 Return last range.
 
template<class I >
bool overwrite (Space &home, I &i)
 Overwrite the ranges with those represented by i.
 
- Protected Attributes inherited from Gecode::Set::BndSet
unsigned int _size
 The size of this set.
 
unsigned int _card
 The cardinality this set represents.
 

Detailed Description

Shrinking sets of integers.

These sets provide operations for monotonically shrinking the set. Shrinking sets are used for implementing the least upper bound of set variables.

Definition at line 243 of file var-imp.hpp.

Constructor & Destructor Documentation

◆ LUBndSet() [1/4]

Gecode::Set::LUBndSet::LUBndSet ( void )
inline

Default constructor. Creates an empty set.

Definition at line 313 of file integerset.hpp.

◆ LUBndSet() [2/4]

Gecode::Set::LUBndSet::LUBndSet ( Space & home)
inline

Initialize as the full set including everything between Limits::min and Limits::max.

Definition at line 316 of file integerset.hpp.

◆ LUBndSet() [3/4]

Gecode::Set::LUBndSet::LUBndSet ( Space & home,
int i,
int j )
inline

Initialize as the set $ \{i,\dots,j\}$.

Definition at line 320 of file integerset.hpp.

◆ LUBndSet() [4/4]

Gecode::Set::LUBndSet::LUBndSet ( Space & home,
const IntSet & s )
inline

Initialize as the set represented by s.

Definition at line 324 of file integerset.hpp.

Member Function Documentation

◆ init()

void Gecode::Set::LUBndSet::init ( Space & home)
inline

Initialize as the full set including everything between Limits::min and Limits::max.

Definition at line 328 of file integerset.hpp.

◆ exclude()

bool Gecode::Set::LUBndSet::exclude ( Space & home,
int i,
int j,
SetDelta & d )
inline

Exclude the set $\{i,\dots,j\}$ from this set.

Definition at line 339 of file integerset.hpp.

◆ intersect()

bool Gecode::Set::LUBndSet::intersect ( Space & home,
int i,
int j )
inline

Intersect this set with the set $\{i,\dots,j\}$.

Definition at line 355 of file integerset.hpp.

◆ intersectI()

template<class I >
bool Gecode::Set::LUBndSet::intersectI ( Space & home,
I & i )

Exclude all elements not in the set represented by i from this set.

Definition at line 370 of file integerset.hpp.

◆ excludeI()

template<class I >
bool Gecode::Set::LUBndSet::excludeI ( Space & home,
I & i )

Exclude all elements in the set represented by i from this set.

Definition at line 385 of file integerset.hpp.

◆ excludeAll()

void Gecode::Set::LUBndSet::excludeAll ( Space & home)
inline

Exclude all elements from this set.

Definition at line 395 of file integerset.hpp.


The documentation for this class was generated from the following files: