public void addSample(Assignment sample){
  samples.add(sample);
  discreteCache=null;
  continuousCache=null;
  variables.addAll(sample.getVariables());
}

public void addSample ( Assignment sample ) { samples . add ( sample ) ; discreteCache = null ; continuousCache = null ; variables . addAll ( sample . getVariables ( ) ) ; }
adds a new sample to the distribution
