private boolean isRelevant(Constraint<?> constraint,Set<VariableReference> targets){
  Set<Variable<?>> variables=constraint.getVariables();
  Set<String> targetNames=new HashSet<String>();
  for (  VariableReference v : targets) {
    targetNames.add(v.getName());
  }
  for (  Variable<?> var : variables) {
    if (targetNames.contains(var.getName()))     return true;
  }
  return false;
}

private boolean isRelevant ( Constraint < ? > constraint , Set < VariableReference > targets ) { Set < Variable < ? > > variables = constraint . getVariables ( ) ; Set < String > targetNames = new HashSet < String > ( ) ; for ( VariableReference v : targets ) { targetNames . add ( v . getName ( ) ) ; } for ( Variable < ? > var : variables ) { if ( targetNames . contains ( var . getName ( ) ) ) return true ; } return false ; }
returns true iff the constraint has at least one variable that is
