1
0
This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.

8 lines
222 B
MiniZinc

include "count_eq.mzn";
/** @group globals.counting
Constrains \a c to be the number of occurrences of \a y in \a x.
*/
predicate count(array[$X] of var int: x, var int: y, var int: c) =
count_eq(array1d(x), y, c);