[ library(gfd) | Reference Manual | Alphabetic Index ]

<ConsistencyModule:> max(+Collection,?Max)

Max is the maximum of the values in Collection
Collection
A collection (a la collection_to_list/2) of integers or (domain )variables
Max
(Domain) variable or integer (array notation accepted)

Description

Max is the maximum of the values in Collection.

You may find it more convenient to embed max(Vars) in a constraint expression.

ConsistencyModule is the optional module specification to give the consistency level for the propagation for this constraint: gfd_bc for bounds consistency, and gfd_gac for domain (generalised arc) consistency.

This constraint is known as maximum in the global constraint catalog, and is implemented using Gecode's max() constraint.

See Also

min / 2, sum / 2, max / 2, ic : max / 2, eclipse_6 : collection_to_list / 2, lists : collection_to_list / 2