Generated on Mon Aug 25 11:35:48 2008 for Gecode by doxygen 1.5.6

Gecode::IntSet Class Reference
[Integer variablesSet variables]

#include <int.hh>

Inherits Gecode::SharedHandle.

List of all members.


Detailed Description

Integer sets.

Integer sets are the means to specify arbitrary sets of integers to be used as domains for integer variables.

Definition at line 123 of file int.hh.


Predefined value

static const IntSet empty
 Empty set.

Constructors and initialization

 IntSet (void)
 Initialize as empty set.
 IntSet (int n, int m)
 Initialize as range with minimum n and maximum m.
 IntSet (const int r[], int n)
 Initialize with n integers from array r.
 IntSet (const int r[][2], int n)
 Initialize with n ranges from array r.
template<class I>
 IntSet (I &i)
 Initialize with range iterator i.

Range length

int size (void) const
 Return number of ranges of the specification.

Range access

int min (int i) const
 Return minimum of range at position i.
int max (int i) const
 Return maximum of range at position i.
unsigned int width (int i) const
 Return width of range at position i.

Entire set access

int min (void) const
 Return minimum of entire set.
int max (void) const
 Return maximum of entire set.

Public Member Functions

template<>
 IntSet (const IntSet &s)
template<>
 IntSet (IntSet &s)

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &, const Gecode::IntSet &s)
 Print integer set s.

Classes

class  MinInc
 Sort ranges according to increasing minimum. More...

Constructor & Destructor Documentation

Gecode::IntSet::IntSet ( void   )  [inline]

Initialize as empty set.

Definition at line 45 of file int-set.icc.

Gecode::IntSet::IntSet ( int  n,
int  m 
) [inline]

Initialize as range with minimum n and maximum m.

Note that the set is empty if n is larger than m

Definition at line 88 of file int-set.icc.

Gecode::IntSet::IntSet ( const int  r[],
int  n 
) [inline]

Initialize with n integers from array r.

Definition at line 83 of file int-set.icc.

Gecode::IntSet::IntSet ( const int  r[][2],
int  n 
) [inline]

Initialize with n ranges from array r.

For position i in the array r, the minimum is r[i][0] and the maximum is r[i][1].

Definition at line 78 of file int-set.icc.

template<class I>
Gecode::IntSet::IntSet ( I &  i  )  [inline, explicit]

Initialize with range iterator i.

Definition at line 48 of file int-set.icc.

template<>
Gecode::IntSet::IntSet ( const IntSet s  )  [inline]

Definition at line 67 of file int-set.icc.

template<>
Gecode::IntSet::IntSet ( IntSet s  )  [inline]

Definition at line 74 of file int-set.icc.


Member Function Documentation

int Gecode::IntSet::size ( void   )  const [inline]

Return number of ranges of the specification.

Definition at line 112 of file int-set.icc.

int Gecode::IntSet::min ( int  i  )  const [inline]

Return minimum of range at position i.

Definition at line 93 of file int-set.icc.

int Gecode::IntSet::max ( int  i  )  const [inline]

Return maximum of range at position i.

Definition at line 99 of file int-set.icc.

unsigned int Gecode::IntSet::width ( int  i  )  const [inline]

Return width of range at position i.

Definition at line 105 of file int-set.icc.

int Gecode::IntSet::min ( void   )  const [inline]

Return minimum of entire set.

Definition at line 118 of file int-set.icc.

int Gecode::IntSet::max ( void   )  const [inline]

Return maximum of entire set.

Definition at line 124 of file int-set.icc.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  ,
const Gecode::IntSet s 
) [related]

Print integer set s.

Definition at line 139 of file int-set.cc.


Member Data Documentation

const IntSet Gecode::IntSet::empty [static]

Empty set.

Definition at line 210 of file int.hh.


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