Gecode::IntVar Class Reference
[Integer variables]
Inherited by Gecode::BoolVar.
Detailed Description
Integer variables.
Definition at line 391 of file var.icc.
Constructors and initialization | |
| IntVar (void) | |
| Default constructor. | |
| IntVar (const IntVar &x) | |
| Initialize from integer variable x. | |
| IntVar (const Int::IntView &x) | |
| Initialize from integer view x. | |
| IntVar (Space *home, int min, int max) | |
| Initialize variable with range domain. | |
| IntVar (Space *home, const IntSet &d) | |
| Initialize variable with arbitrary domain. | |
| void | init (Space *home, int min, int max) |
| Initialize variable with range domain. | |
| void | init (Space *home, const IntSet &d) |
| Initialize variable with arbitrary domain. | |
Variable implementation access | |
| Int::IntVarImp * | variable (void) const |
| Return integer variable implementation. | |
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 | degree (void) const |
| Return degree (number of subscribed propagators). | |
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. | |
Cloning | |
| void | update (Space *home, bool share, IntVar &x) |
| Update this variable to be a clone of variable x. | |
Protected Attributes | |
| Int::IntVarImp * | var |
| Integer variable implementation used. | |
Related Functions | |
| (Note that these are not member functions.) | |
| std::ostream & | operator<< (std::ostream &, const Gecode::IntVar &x) |
| Print integer variable x. | |
Constructor & Destructor Documentation
|
|
Default constructor.
|
|
|
Initialize from integer variable x.
|
|
|
Initialize from integer view x.
|
|
||||||||||||||||
|
Initialize variable with range domain. The variable is created with a domain ranging from min to max. The following exceptions might be thrown:
|
|
||||||||||||
|
Initialize variable with arbitrary domain. The variable is created with a domain described by d. The following exceptions might be thrown:
|
Member Function Documentation
|
||||||||||||||||
|
Initialize variable with range domain. The variable is created with a domain ranging from min to max. The following exceptions might be thrown:
|
|
||||||||||||
|
Initialize variable with arbitrary domain. The variable is created with a domain described by d. The following exceptions might be thrown:
|
|
|
Return integer variable implementation.
|
|
|
Return minimum of domain.
|
|
|
Return maximum of domain.
|
|
|
Return median of domain.
|
|
|
Return assigned value (only if assigned).
|
|
|
Return size (cardinality) of domain.
|
|
|
Return width of domain (distance between maximum and minimum).
|
|
|
Return degree (number of subscribed propagators).
|
|
|
Test whether domain is a range.
|
|
|
Test whether view is assigned.
|
|
|
Test whether n is contained in domain.
|
|
||||||||||||||||
|
Update this variable to be a clone of variable x.
|
Friends And Related Function Documentation
|
||||||||||||
|
Print integer variable x.
|
Member Data Documentation
|
|
Integer variable implementation used.
|
The documentation for this class was generated from the following files:
- gecode/int/var.icc (Revision: 3686)
- gecode/int/var/int.cc (Revision: 3703)
- gecode/int/var/int.icc (Revision: 3686)
