docs: public FactorGraph addVariable(String variableName, Variable variable) {
      Preconditions.checkArgument(!getVariables().contains(variableName));
      int varNum = getAllVariables().size() > 0 ? Ints.max(getAllVariables().getVariableNumsArray()) + 1 : 0;
      return addVariableWithIndex(variableName, variable, varNum);
    }