Added check for adjacent cells in setUnequalities in class rules.