docs: public FactorGraph addFactor(String factorName, Factor factor) {
      Preconditions.checkArgument(getVariables().containsAll(factor.getVars()));
  
      Factor[] newFactors = Arrays.copyOf(factors, factors.length + 1);
      String[] newFactorNames = Arrays.copyOf(factorNames, factorNames.length + 1);
      ;
      newFactors[factors.length] = factor;
      newFactorNames[factors.length] = factorName;
      return new FactorGraph(variables, newFactors, newFactorNames, conditionedVariables,
          conditionedValues, inferenceHint);
    }