docs: public void addConstantFactor(String factorName, Factor factor) {
      if (variables.containsAll(factor.getVars())) {
        int factorNum = factors.size();
        factors.add(factor);
        factorNames.add(factorName);
  
        VariableNumMap factorVars = factor.getVars();
        for (Integer varNum : factorVars.getVariableNums()) {
          variableFactorMap.put(varNum, factorNum);
          factorVariableMap.put(factorNum, varNum);
        }
      } else {
        Preconditions.checkState(!isRoot);
        crossingFactors.add(factor);
      }
    }