code: public static TableFactor pointDistribution(VariableNumMap vars, Assignment... assignments) {
      TableFactorBuilder builder = new TableFactorBuilder(vars, SparseTensorBuilder.getFactory());
      for (int i = 0; i < assignments.length; i++) {
        builder.setWeight(assignments[i], 1.0);
      }
      // TODO: support for implicit repmat of the assignments.
  
      return builder.build();
    }
docs: Gets a {@code TableFactor} over {@code vars} which assigns unit weight to
  all assignments in {@code assignments} and 0 to all other assignments.
  Requires each assignment in {@code assignments} to contain all of
  {@code vars}.
  
  @param vars
  @param assignment
  @return