code: public void setWeight(Assignment a, double weight) {
      Preconditions.checkArgument(a.containsAll(vars.getVariableNumsArray()));
      weightBuilder.put(vars.assignmentToIntArray(a), weight);
    }
docs: Sets the weight of {@code a} to {@code weight} in the table factor returned
  by {@link #build()}. If {@code a} has already been associated with a weight
  in {@code this} builder, this call overwrites the old weight. If
  {@code weight} is 0.0, {@code a} is deleted from this builder.