for (int i = 0; i < VARS1.length && allEnum; i++) {
if (!(VARS1[i].hasEnumeratedDomain() && VARS2[i].hasEnumeratedDomain())) {
allEnum = false;
}
}
Propagator ip = allEnum ? new PropInverseChannelAC(VARS1, VARS2, OFFSET1, OFFSET2)
: new PropInverseChannelBC(VARS1, VARS2, OFFSET1, OFFSET2);
return new Constraint("InverseChanneling", ArrayUtils.append(
alldifferent(VARS1).getPropagators(),
alldifferent(VARS2).getPropagators(),
new Propagator[]{ip}