@Override public void modifyVariableId(String oldId,String newId){
  if (variables.contains(oldId)) {
    variables.remove(oldId);
    variables.add(newId);
  }
  for (  Assignment a : samples) {
    if (a.containsVar(oldId)) {
      Value v=a.removePair(oldId);
      a.addPair(newId,v);
    }
  }
  if (discreteCache != null) {
    discreteCache.modifyVariableId(oldId,newId);
  }
  if (continuousCache != null) {
    continuousCache.modifyVariableId(oldId,newId);
  }
}

@ Override public void modifyVariableId ( String oldId , String newId ) { if ( variables . contains ( oldId ) ) { variables . remove ( oldId ) ; variables . add ( newId ) ; } for ( Assignment a : samples ) { if ( a . containsVar ( oldId ) ) { Value v = a . removePair ( oldId ) ; a . addPair ( newId , v ) ; } } if ( discreteCache != null ) { discreteCache . modifyVariableId ( oldId , newId ) ; } if ( continuousCache != null ) { continuousCache . modifyVariableId ( oldId , newId ) ; } }
replace a variable label by a new one
