Connection constraints to integer variables
Functionality by programming task » Programming models » Using integer set variables and constraints

## Functions

void | Gecode::min (Home home, SetVar s, IntVar x)
| Post propagator that x is the minimal element of s and that s is not empty.
void | Gecode::notMin (Home home, SetVar s, IntVar x)
| Post propagator that x is not the minimal element of s.
void | Gecode::min (Home home, SetVar s, IntVar x, Reify r)
| Post reified propagator for b iff x is the minimal element of s.
void | Gecode::max (Home home, SetVar s, IntVar x)
| Post propagator that x is the maximal element of s and that s is not empty.
void | Gecode::notMax (Home home, SetVar s, IntVar x)
| Post propagator that x is not the maximal element of s.
void | Gecode::max (Home home, SetVar s, IntVar x, Reify r)
| Post reified propagator for b iff x is the maximal element of s.
void | Gecode::cardinality (Home home, SetVar s, IntVar x)
| Post propagator for .
void | Gecode::cardinality (Home home, SetVar s, IntVar x, Reify r)
| Post reified propagator for .
void | Gecode::weights (Home home, IntSharedArray elements, IntSharedArray weights, SetVar x, IntVar y)
| Post propagator for .

## Detailed Description

## Function Documentation

## min() [1/2]

void Gecode::min | ( | Home | home,
|  | SetVar | s,
|  | IntVar | x )

Post propagator that x is the minimal element of s and that s is not empty.

Definition at line 229 of file int.cpp.

## notMin()

void Gecode::notMin | ( | Home | home,
|  | SetVar | s,
|  | IntVar | x )

Post propagator that x is not the minimal element of s.

Definition at line 235 of file int.cpp.

## min() [2/2]

void Gecode::min | ( | Home | home,
|  | SetVar | s,
|  | IntVar | x,
|  | Reify | r )

Post reified propagator for b iff x is the minimal element of s.

Definition at line 241 of file int.cpp.

## max() [1/2]

void Gecode::max | ( | Home | home,
|  | SetVar | s,
|  | IntVar | x )

Post propagator that x is the maximal element of s and that s is not empty.

Definition at line 261 of file int.cpp.

## notMax()

void Gecode::notMax | ( | Home | home,
|  | SetVar | s,
|  | IntVar | x )

Post propagator that x is not the maximal element of s.

Definition at line 267 of file int.cpp.

## max() [2/2]

void Gecode::max | ( | Home | home,
|  | SetVar | s,
|  | IntVar | x,
|  | Reify | r )

Post reified propagator for b iff x is the maximal element of s.

Definition at line 273 of file int.cpp.

## cardinality() [1/2]

void Gecode::cardinality | ( | Home | home,
|  | SetVar | s,
|  | IntVar | x )

Post propagator for .

Definition at line 66 of file cardinality.cpp.

## cardinality() [2/2]

void Gecode::cardinality | ( | Home | home,
|  | SetVar | s,
|  | IntVar | x,
|  | Reify | r )

Post reified propagator for .

Definition at line 72 of file cardinality.cpp.

## weights()

void Gecode::weights | ( | Home | home,
|  | IntSharedArray | elements,
|  | IntSharedArray | weights,
|  | SetVar | x,
|  | IntVar | y )

Post propagator for .

The weights are given as pairs of elements and their weight:

The upper bound of x is constrained to contain only elements from elements. The weight of a set is the sum of the weights of its elements.

Definition at line 292 of file int.cpp.