code: public void addTransitionLogProbability(S fromPosition, S toPosition,
                                              double transitionLogProbability) {
          final Transition<S> transition = new Transition<>(fromPosition, toPosition);
          if (transitionLogProbabilities.containsKey(transition)) {
              throw new IllegalArgumentException("Transition has already been added.");
          }
          transitionLogProbabilities.put(transition, transitionLogProbability);
      }
docs: Does not need to be called for non-existent transitions.