public void addToState(ProbDistribution distrib){
  String variable=distrib.getVariable() + "'";
  setAsCommitted(variable);
  distrib.modifyVariableId(distrib.getVariable(),variable);
  ChanceNode newNode=new ChanceNode(variable,distrib);
  if (hasNode(variable)) {
    BNode toRemove=getNode(variable);
    removeNodes(toRemove.getDescendantIds());
    removeNode(toRemove.getId());
  }
  for (  String inputVar : distrib.getInputVariables()) {
    if (hasChanceNode(inputVar)) {
      newNode.addInputNode(getChanceNode(inputVar));
    }
  }
  addNode(newNode);
  connectToPredictions(newNode);
  incrementalVars.remove(variable);
}

public void addToState ( ProbDistribution distrib ) { String variable = distrib . getVariable ( ) + "'" ; setAsCommitted ( variable ) ; distrib . modifyVariableId ( distrib . getVariable ( ) , variable ) ; ChanceNode newNode = new ChanceNode ( variable , distrib ) ; if ( hasNode ( variable ) ) { BNode toRemove = getNode ( variable ) ; removeNodes ( toRemove . getDescendantIds ( ) ) ; removeNode ( toRemove . getId ( ) ) ; } for ( String inputVar : distrib . getInputVariables ( ) ) { if ( hasChanceNode ( inputVar ) ) { newNode . addInputNode ( getChanceNode ( inputVar ) ) ; } } addNode ( newNode ) ; connectToPredictions ( newNode ) ; incrementalVars . remove ( variable ) ; }
adds a new node to the dialogue state with the distribution provided as argument .
