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

Numerical limits for set variables. More...

Functions

void check (int n, const char *l)
 Check whether integer n is in range, otherwise throw overflow exception with information l.
 
void check (unsigned int n, const char *l)
 Check whether unsigned int n is in range for cardinality, otherwise throw overflow exception with information l.
 
void check (const IntSet &s, const char *l)
 Check whether minimum and maximum of IntSet s is in range, otherwise throw overflow exception with information l.
 

Variables

const int max = (Gecode::Int::Limits::max / 2) - 1
 Largest allowed integer in integer set.
 
const int min = -max
 Smallest allowed integer in integer set.
 
const unsigned int card = max-min+1
 Maximum cardinality of an integer set.
 

Detailed Description

Numerical limits for set variables.

Function Documentation

◆ check() [1/3]

void Gecode::Set::Limits::check ( int n,
const char * l )
inline

Check whether integer n is in range, otherwise throw overflow exception with information l.

Definition at line 37 of file limits.hpp.

◆ check() [2/3]

void Gecode::Set::Limits::check ( unsigned int n,
const char * l )
inline

Check whether unsigned int n is in range for cardinality, otherwise throw overflow exception with information l.

Definition at line 43 of file limits.hpp.

◆ check() [3/3]

void Gecode::Set::Limits::check ( const IntSet & s,
const char * l )
inline

Check whether minimum and maximum of IntSet s is in range, otherwise throw overflow exception with information l.

Definition at line 49 of file limits.hpp.

Variable Documentation

◆ max

const int Gecode::Set::Limits::max = (Gecode::Int::Limits::max / 2) - 1

Largest allowed integer in integer set.

Definition at line 97 of file set.hh.

◆ min

const int Gecode::Set::Limits::min = -max

Smallest allowed integer in integer set.

Definition at line 99 of file set.hh.

◆ card

const unsigned int Gecode::Set::Limits::card = max-min+1

Maximum cardinality of an integer set.

Definition at line 101 of file set.hh.