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

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
Variable or integer

Description

Max is the maximum of the values in Collection.

You may find it more convenient to embed maxlist(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, lists : collection_to_list / 2