IntExpArray cValueVars = problem.getExpArray(valueVars);
IntExpArray cCardVars = problem.getExpArray(valueVars);
try {
IntArrayCards givenCards = cCardVars.cards();
IntArrayCards distributedCards = constrainer.distribute(cVars,cValueVars);
Constraint newC = new ConstrainerArrayCardsEq(distributedCards,givenCards);
setImpl(constrainer.addConstraint(newC));
} catch (Exception f) {
throw new RuntimeException(
"Failure to create GlobalCardinality constraint");
}