Generated on Thu Apr 5 2018 19:44:19 for Gecode by doxygen 1.8.13

Class represeting a set of tuples. More...

#include <int.hh>

Classes

class  Data
 Data stored for a Table. More...
 
class  Range
 Range information. More...
 
class  Ranges
 Iterator over ranges. More...
 
class  ValueData
 Data about values in the table. More...
 

Public Types

typedef int * Tuple
 Type of a tuple. More...
 
typedef Gecode::Support::BitSetData BitSetData
 Import bit set data type. More...
 

Protected Member Functions

Datadata (void) const
 Get data (must be initialized and finalized) More...
 
Dataraw (void) const
 Get raw data (must be initialized) More...
 
void _add (const IntArgs &t)
 Add tuple t to tuple set. More...
 
bool equal (const TupleSet &t) const
 Test whether tuple set is equal to t. More...
 
- Protected Member Functions inherited from Gecode::SharedHandle
SharedHandle::Objectobject (void) const
 Access to the shared object. More...
 
void object (SharedHandle::Object *n)
 Modify shared object. More...
 

Related Functions

(Note that these are not member functions.)

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const TupleSet &ts)
 

Initialization

 TupleSet (void)
 Construct an unitialized tuple set. More...
 
 TupleSet (int a)
 Initialize for a tuple set with arity a. More...
 
void init (int a)
 Initialize an uninitialized tuple set. More...
 
 TupleSet (const TupleSet &t)
 Initialize by TupleSet t (tuple set is shared) More...
 
TupleSetoperator= (const TupleSet &t)
 Assignment operator. More...
 
 TupleSet (int a, const DFA &dfa)
 Initialize with DFA dfa for arity a. More...
 
 operator bool (void) const
 Test whether tuple set has been initialized. More...
 
bool operator== (const TupleSet &t) const
 Test whether tuple set is equal to t. More...
 
bool operator!= (const TupleSet &t) const
 Test whether tuple set is different from t. More...
 

Addition and finalization

TupleSetadd (const IntArgs &t)
 Add tuple t to tuple set. More...
 
TupleSetadd (int n,...)
 Add tuple with elements n, ... to tuple set. More...
 
bool finalized (void) const
 Is tuple set finalized. More...
 
void finalize (void)
 Finalize tuple set. More...
 

Tuple access

int arity (void) const
 Arity of tuple set. More...
 
int tuples (void) const
 Number of tuples. More...
 
unsigned int words (void) const
 Return number of required bit set words. More...
 
Tuple operator[] (int i) const
 Get tuple i. More...
 
int min (void) const
 Return minimal value in all tuples. More...
 
int max (void) const
 Return maximal value in all tuples. More...
 
std::size_t hash (void) const
 Return hash key. More...
 

Range access and iteration

const Rangefst (int i) const
 Return first range for position i. More...
 
const Rangelst (int i) const
 Return last range for position i. More...
 

Additional Inherited Members

- Public Member Functions inherited from Gecode::SharedHandle
 SharedHandle (void)
 Create shared handle with no object pointing to. More...
 
 SharedHandle (SharedHandle::Object *so)
 Create shared handle that points to shared object so. More...
 
 SharedHandle (const SharedHandle &sh)
 Copy constructor maintaining reference count. More...
 
SharedHandleoperator= (const SharedHandle &sh)
 Assignment operator maintaining reference count. More...
 
 ~SharedHandle (void)
 Destructor that maintains reference count. More...
 
 operator bool (void) const
 Whether handle points to an object. More...
 

Detailed Description

Class represeting a set of tuples.

A TupleSet is used for storing an extensional representation of a constraint. After a TupleSet is finalized, no more tuples may be added to it.

Definition at line 2144 of file int.hh.

Member Typedef Documentation

◆ Tuple

Type of a tuple.

The arity of the tuple is left implicit.

Definition at line 2150 of file int.hh.

◆ BitSetData

Import bit set data type.

Definition at line 2152 of file int.hh.

Constructor & Destructor Documentation

◆ TupleSet() [1/4]

Gecode::TupleSet::TupleSet ( void  )
inline

Construct an unitialized tuple set.

Definition at line 151 of file tuple-set.hpp.

◆ TupleSet() [2/4]

Gecode::TupleSet::TupleSet ( int  a)

Initialize for a tuple set with arity a.

Definition at line 270 of file tuple-set.cpp.

◆ TupleSet() [3/4]

Gecode::TupleSet::TupleSet ( const TupleSet t)

Initialize by TupleSet t (tuple set is shared)

Definition at line 276 of file tuple-set.cpp.

◆ TupleSet() [4/4]

Gecode::TupleSet::TupleSet ( int  a,
const DFA dfa 
)

Initialize with DFA dfa for arity a.

Edges in layered graph

< Number of in-state

< Number of out-state

State in layered graph

< In-degree (number of incoming arcs)

< Out-degree (number of outgoing arcs)

< Number of tuples

< The tuples

Support for a value

< Supported value

< Number of supporting edges

< Supporting edges

Layer in layered graph

< States

< Supported values

< Number of supported values

Definition at line 284 of file tuple-set.cpp.

Member Function Documentation

◆ data()

TupleSet::Data & Gecode::TupleSet::data ( void  ) const
inlineprotected

Get data (must be initialized and finalized)

Definition at line 171 of file tuple-set.hpp.

◆ raw()

TupleSet::Data & Gecode::TupleSet::raw ( void  ) const
inlineprotected

Get raw data (must be initialized)

Definition at line 176 of file tuple-set.hpp.

◆ _add()

void Gecode::TupleSet::_add ( const IntArgs t)
protected

Add tuple t to tuple set.

Definition at line 464 of file tuple-set.cpp.

◆ equal()

bool Gecode::TupleSet::equal ( const TupleSet t) const
protected

Test whether tuple set is equal to t.

Definition at line 451 of file tuple-set.cpp.

◆ init()

void Gecode::TupleSet::init ( int  a)

Initialize an uninitialized tuple set.

Definition at line 273 of file tuple-set.cpp.

◆ operator=()

TupleSet & Gecode::TupleSet::operator= ( const TupleSet t)

Assignment operator.

Definition at line 279 of file tuple-set.cpp.

◆ operator bool()

Gecode::TupleSet::operator bool ( void  ) const
inline

Test whether tuple set has been initialized.

Definition at line 154 of file tuple-set.hpp.

◆ operator==()

bool Gecode::TupleSet::operator== ( const TupleSet t) const
inline

Test whether tuple set is equal to t.

Definition at line 218 of file tuple-set.hpp.

◆ operator!=()

bool Gecode::TupleSet::operator!= ( const TupleSet t) const
inline

Test whether tuple set is different from t.

Definition at line 181 of file tuple-set.hpp.

◆ add() [1/2]

TupleSet & Gecode::TupleSet::add ( const IntArgs t)
inline

Add tuple t to tuple set.

Definition at line 146 of file tuple-set.hpp.

◆ add() [2/2]

TupleSet & Gecode::TupleSet::add ( int  n,
  ... 
)

Add tuple with elements n, ... to tuple set.

Definition at line 477 of file tuple-set.cpp.

◆ finalized()

bool Gecode::TupleSet::finalized ( void  ) const
inline

Is tuple set finalized.

Definition at line 166 of file tuple-set.hpp.

◆ finalize()

void Gecode::TupleSet::finalize ( void  )
inline

Finalize tuple set.

Definition at line 159 of file tuple-set.hpp.

◆ arity()

int Gecode::TupleSet::arity ( void  ) const
inline

Arity of tuple set.

Definition at line 185 of file tuple-set.hpp.

◆ tuples()

int Gecode::TupleSet::tuples ( void  ) const
inline

Number of tuples.

Definition at line 189 of file tuple-set.hpp.

◆ words()

unsigned int Gecode::TupleSet::words ( void  ) const
inline

Return number of required bit set words.

Definition at line 193 of file tuple-set.hpp.

◆ operator[]()

TupleSet::Tuple Gecode::TupleSet::operator[] ( int  i) const
inline

Get tuple i.

Definition at line 205 of file tuple-set.hpp.

◆ min()

int Gecode::TupleSet::min ( void  ) const
inline

Return minimal value in all tuples.

Definition at line 197 of file tuple-set.hpp.

◆ max()

int Gecode::TupleSet::max ( void  ) const
inline

Return maximal value in all tuples.

Definition at line 201 of file tuple-set.hpp.

◆ hash()

std::size_t Gecode::TupleSet::hash ( void  ) const
inline

Return hash key.

Definition at line 231 of file tuple-set.hpp.

◆ fst()

const TupleSet::Range * Gecode::TupleSet::fst ( int  i) const
inline

Return first range for position i.

Definition at line 209 of file tuple-set.hpp.

◆ lst()

const TupleSet::Range * Gecode::TupleSet::lst ( int  i) const
inline

Return last range for position i.

Definition at line 213 of file tuple-set.hpp.

Friends And Related Function Documentation

◆ operator<<()

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > &  os,
const TupleSet ts 
)
related

Print TupleSet ts

Definition at line 238 of file tuple-set.hpp.


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