code: public void incrementWeight(DiscreteFactor factor) {
      Preconditions.checkArgument(factor.getVars().equals(getVars()));
      weightBuilder.increment(factor.getWeights());
    }
docs: Increments the weight of each assignment in {@code this} by its weight in
  {@code factor}.
  
  @param factor