code: public void max(DiscreteFactor factor) {
      Preconditions.checkArgument(factor.getVars().equals(getVars()));
      weightBuilder.maximum(factor.getWeights());
    }
docs: Sets the weight of each assignment in this to the maximum
  of its current weight and its weight in {@code factor}.
  
  @param factor