[ library(gfd) | Reference Manual | Alphabetic Index ]
lex_ge(+Collection1, +Collection2)
Collection1 is lexicographically greater or equal to Collection2
- Collection1
- Collection of integers or (domain) variables
- Collection2
- Collection of integers or (domain) variables
Description
    	Imposes a lexicographic ordering between the two lists. 
	I.e.  either is the first element of Collection1 strictly larger
	than the first element of Collection2, or the first elements are
	equal and the lexicographic order holds between the two list
	tails. A non-existing element (i.e. when the end of list is 
        reached) is strictly smaller than any existing element.
        This constraint is known as lex_greatereq in the global constraint
        catalog, but the catalog's definition requires Collection1 and
        Collection2 to be the same size. It is implemented using Gecode's
        rel() constraint (variant that takes two IntVarArgs arguments),
        with the IRT_GQ IntRelType.
Examples
[eclipse 40]: lex_ge([5,2,8,9],[5,2,6,2]).
...
Yes (0.00s cpu)
[eclipse 41]: lex_ge([5,2,3,9], [5,2,3,9]).
...
Yes (0.00s cpu)
[eclipse 42]: lex_ge([5,2,3,9], [5,2,3]).
...
Yes (0.00s cpu)
[eclipse 43]: lex_ge([5,2,3,9], [5,3,1]).
No (0.00s cpu)
See Also
lex_lt / 2, lex_gt / 2, lex_eq / 2, lex_ne / 2