code: public Factor addStaticBinaryFactor(int a, int b, BiFunction<Integer, Integer, Double> value) {
      int[] variableDims = getVariableSizes();
      assert a < variableDims.length;
      assert b < variableDims.length;
      return addStaticFactor(new int[]{a, b}, new int[]{variableDims[a], variableDims[b]}, assignment ->
          value.apply(assignment[0], assignment[1]));
    }
docs: Add a binary factor, where we just want to hard-code the value of the factor.
  
  @param a The index of the first variable.
  @param b The index of the second variable.
  @param value A mapping from assignments of the two variables, to a factor value.
  
  @return a reference to the created factor. This can be safely ignored, as the factor is already saved in the model