Generated on Wed Nov 1 15:05:15 2006 for Gecode by doxygen 1.4.5

Gecode::Int::IntView Class Reference
[Integer views]

Inherits Gecode::VariableViewBase< IntVarImp >.

Inherited by Gecode::Int::BoolView.

List of all members.


Detailed Description

Integer view for integer variables.

Definition at line 124 of file view.icc.

Constructors and initialization

 IntView (void)
 Default constructor.
 IntView (const IntVar &x)
 Initialize from integer variable x.

Value access

int min (void) const
 Return minimum of domain.
int max (void) const
 Return maximum of domain.
int med (void) const
 Return median of domain.
int val (void) const
 Return assigned value (only if assigned).
unsigned int size (void) const
 Return size (cardinality) of domain.
unsigned int width (void) const
 Return width of domain (distance between maximum and minimum).
unsigned int regret_min (void) const
 Return regret of domain minimum (distance to next larger value).
unsigned int regret_max (void) const
 Return regret of domain maximum (distance to next smaller value).

Domain tests

bool range (void) const
 Test whether domain is a range.
bool assigned (void) const
 Test whether view is assigned.
bool in (int n) const
 Test whether n is contained in domain.
bool in (double n) const
 Test whether n is contained in domain.

Domain update by value

ModEvent lq (Space *home, int n)
 Restrict domain values to be less or equal than n.
ModEvent lq (Space *home, double n)
 Restrict domain values to be less or equal than n.
ModEvent le (Space *home, int n)
 Restrict domain values to be less than n.
ModEvent le (Space *home, double n)
 Restrict domain values to be less than n.
ModEvent gq (Space *home, int n)
 Restrict domain values to be greater or equal than n.
ModEvent gq (Space *home, double n)
 Restrict domain values to be greater or equal than n.
ModEvent gr (Space *home, int n)
 Restrict domain values to be greater than n.
ModEvent gr (Space *home, double n)
 Restrict domain values to be greater than n.
ModEvent nq (Space *home, int n)
 Restrict domain values to be different from n.
ModEvent nq (Space *home, double n)
 Restrict domain values to be different from n.
ModEvent eq (Space *home, int n)
 Restrict domain values to be equal to n.
ModEvent eq (Space *home, double n)
 Restrict domain values to be equal to n.

Domain update by range iterator

template<class I>
ModEvent narrow (Space *home, I &i)
 Replace domain by range sequence described by i.
template<class I>
ModEvent inter (Space *home, I &i)
 Intersect domain with range sequence described by i.
template<class I>
ModEvent minus (Space *home, I &i)
 Remove from domain the range sequence described by i.

Cloning

void update (Space *home, bool share, IntView &x)
 Update this view to be a clone of view x.

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &, const Gecode::Int::IntView &)
 Print integer variable view.


Constructor & Destructor Documentation

Gecode::Int::IntView::IntView void   )  [inline]
 

Default constructor.

Definition at line 29 of file int.icc.

Gecode::Int::IntView::IntView const IntVar x  )  [inline]
 

Initialize from integer variable x.

Definition at line 31 of file int.icc.


Member Function Documentation

int Gecode::Int::IntView::min void   )  const [inline]
 

Return minimum of domain.

Definition at line 40 of file int.icc.

int Gecode::Int::IntView::max void   )  const [inline]
 

Return maximum of domain.

Definition at line 44 of file int.icc.

int Gecode::Int::IntView::med void   )  const [inline]
 

Return median of domain.

Definition at line 48 of file int.icc.

int Gecode::Int::IntView::val void   )  const [inline]
 

Return assigned value (only if assigned).

Definition at line 52 of file int.icc.

unsigned int Gecode::Int::IntView::size void   )  const [inline]
 

Return size (cardinality) of domain.

Definition at line 57 of file int.icc.

unsigned int Gecode::Int::IntView::width void   )  const [inline]
 

Return width of domain (distance between maximum and minimum).

Definition at line 61 of file int.icc.

unsigned int Gecode::Int::IntView::regret_min void   )  const [inline]
 

Return regret of domain minimum (distance to next larger value).

Definition at line 65 of file int.icc.

unsigned int Gecode::Int::IntView::regret_max void   )  const [inline]
 

Return regret of domain maximum (distance to next smaller value).

Definition at line 69 of file int.icc.

bool Gecode::Int::IntView::range void   )  const [inline]
 

Test whether domain is a range.

Definition at line 79 of file int.icc.

bool Gecode::Int::IntView::assigned void   )  const [inline]
 

Test whether view is assigned.

Definition at line 83 of file int.icc.

bool Gecode::Int::IntView::in int  n  )  const [inline]
 

Test whether n is contained in domain.

Definition at line 88 of file int.icc.

bool Gecode::Int::IntView::in double  n  )  const [inline]
 

Test whether n is contained in domain.

Definition at line 92 of file int.icc.

ModEvent Gecode::Int::IntView::lq Space home,
int  n
[inline]
 

Restrict domain values to be less or equal than n.

Definition at line 102 of file int.icc.

ModEvent Gecode::Int::IntView::lq Space home,
double  n
[inline]
 

Restrict domain values to be less or equal than n.

Definition at line 106 of file int.icc.

ModEvent Gecode::Int::IntView::le Space home,
int  n
[inline]
 

Restrict domain values to be less than n.

Definition at line 111 of file int.icc.

ModEvent Gecode::Int::IntView::le Space home,
double  n
[inline]
 

Restrict domain values to be less than n.

Definition at line 115 of file int.icc.

ModEvent Gecode::Int::IntView::gq Space home,
int  n
[inline]
 

Restrict domain values to be greater or equal than n.

Definition at line 120 of file int.icc.

ModEvent Gecode::Int::IntView::gq Space home,
double  n
[inline]
 

Restrict domain values to be greater or equal than n.

Definition at line 124 of file int.icc.

ModEvent Gecode::Int::IntView::gr Space home,
int  n
[inline]
 

Restrict domain values to be greater than n.

Definition at line 129 of file int.icc.

ModEvent Gecode::Int::IntView::gr Space home,
double  n
[inline]
 

Restrict domain values to be greater than n.

Definition at line 133 of file int.icc.

ModEvent Gecode::Int::IntView::nq Space home,
int  n
[inline]
 

Restrict domain values to be different from n.

Definition at line 138 of file int.icc.

ModEvent Gecode::Int::IntView::nq Space home,
double  n
[inline]
 

Restrict domain values to be different from n.

Definition at line 142 of file int.icc.

ModEvent Gecode::Int::IntView::eq Space home,
int  n
[inline]
 

Restrict domain values to be equal to n.

Definition at line 147 of file int.icc.

ModEvent Gecode::Int::IntView::eq Space home,
double  n
[inline]
 

Restrict domain values to be equal to n.

Definition at line 151 of file int.icc.

template<class I>
ModEvent Gecode::Int::IntView::narrow Space home,
I &  i
[inline]
 

Replace domain by range sequence described by i.

Definition at line 162 of file int.icc.

template<class I>
ModEvent Gecode::Int::IntView::inter Space home,
I &  i
[inline]
 

Intersect domain with range sequence described by i.

Definition at line 167 of file int.icc.

template<class I>
ModEvent Gecode::Int::IntView::minus Space home,
I &  i
[inline]
 

Remove from domain the range sequence described by i.

Definition at line 172 of file int.icc.

void Gecode::Int::IntView::update Space home,
bool  share,
IntView x
[inline]
 

Update this view to be a clone of view x.

Definition at line 182 of file int.icc.


Friends And Related Function Documentation

std::ostream & operator<< std::ostream &  ,
const Gecode::Int::IntView
[related]
 

Print integer variable view.

Definition at line 75 of file print.cc.


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