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
249 B
MiniZinc

include "count.mzn";
/** @group globals.counting
Returns the number of occurrences of \a y in \a x.
*/
function var int: count(array[int] of var int: x, var int: y) ::promise_total =
let { var 0..length(x): c; constraint count(x,y,c); } in c;