@Override public Value sample(Assignment condition){
  if (condition.size() != conditionalVars.size()) {
    condition=condition.getTrimmed(conditionalVars);
  }
  IndependentDistribution subdistrib=table.get(condition);
  if (subdistrib != null) {
    return subdistrib.sample();
  }
  return ValueFactory.none();
}

@ Override public Value sample ( Assignment condition ) { if ( condition . size ( ) != conditionalVars . size ( ) ) { condition = condition . getTrimmed ( conditionalVars ) ; } IndependentDistribution subdistrib = table . get ( condition ) ; if ( subdistrib != null ) { return subdistrib . sample ( ) ; } return ValueFactory . none ( ) ; }
sample a head assignment from the distribution p ( head | condition ) , given the condition . if no assignment can be sampled ( due to e . g . an ill - formed distribution ) , returns an empty assignment .
