git-subtree-dir: software/minizinc git-subtree-split: 4f10c82056ffcb1041d7ffef29d77a7eef92cf76
8 lines
222 B
MiniZinc
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);
|