Generated on Mon Nov 30 23:53:52 2009 for Gecode by doxygen 1.6.1

Gecode::Int::Limits Namespace Reference
[Integer variables]

Numerical limits for integer variables. More...

Functions

void check (int n, const char *l)
 Check whether integer n is in range, otherwise throw out of limits with information l.
void check (double n, const char *l)
 Check whether double n is in integer range, otherwise throw out of limits exception with information l.
void positive (int n, const char *l)
 Check whether integer n is in range and strictly positive, otherwise throw out of limits with information l.
void positive (double n, const char *l)
 Check whether double n is in integer range and strictly postive, otherwise throw out of limits exception with information l.

Variables

const int max = INT_MAX - 1
 Largest allowed integer value.
const int min = -max
 Smallest allowed integer value.
const int infinity = max + 1
 Infinity.

Detailed Description

Numerical limits for integer variables.

The integer limits are chosen such changing the sign is always possible without overflow.


Function Documentation

void Gecode::Int::Limits::check ( int  n,
const char *  l 
) [inline]

Check whether integer n is in range, otherwise throw out of limits with information l.

Definition at line 41 of file limits.hpp.

void Gecode::Int::Limits::check ( double  n,
const char *  l 
) [inline]

Check whether double n is in integer range, otherwise throw out of limits exception with information l.

Definition at line 47 of file limits.hpp.

void Gecode::Int::Limits::positive ( int  n,
const char *  l 
) [inline]

Check whether integer n is in range and strictly positive, otherwise throw out of limits with information l.

Definition at line 53 of file limits.hpp.

void Gecode::Int::Limits::positive ( double  n,
const char *  l 
) [inline]

Check whether double n is in integer range and strictly postive, otherwise throw out of limits exception with information l.

Definition at line 59 of file limits.hpp.


Variable Documentation

const int Gecode::Int::Limits::max = INT_MAX - 1

Largest allowed integer value.

Definition at line 106 of file int.hh.

Smallest allowed integer value.

Definition at line 108 of file int.hh.

Infinity.

Definition at line 110 of file int.hh.