public MultivariateTable(CategoricalTable headTable){
  this.headVars=new HashSet<String>(Arrays.asList(headTable.getVariable()));
  this.table=new HashMap<Assignment,Double>();
  String variable=headTable.getVariable();
  for (  Value a : headTable.getValues()) {
    double prob=headTable.getProb(a);
    table.put(new Assignment(variable,a),prob);
  }
}

public MultivariateTable ( CategoricalTable headTable ) { this . headVars = new HashSet < String > ( Arrays . asList ( headTable . getVariable ( ) ) ) ; this . table = new HashMap < Assignment , Double > ( ) ; String variable = headTable . getVariable ( ) ; for ( Value a : headTable . getValues ( ) ) { double prob = headTable . getProb ( a ) ; table . put ( new Assignment ( variable , a ) , prob ) ; } }
constructs a new multivariate table from a univariate table .
