docs: private double getPartitionFunction() {
      if (partitionFunction != -1.0) {
        return partitionFunction;
      }
  
      partitionFunction = 0.0;
      Iterator<Outcome> outcomeIterator = outcomeIterator();
      while (outcomeIterator.hasNext()) {
        partitionFunction += outcomeIterator.next().getProbability();
      }
      return partitionFunction;
    }