docs: public double getDistance(int from, int to) {
          if (hasErrors()) {
              throw new IllegalStateException("Cannot return distance (" + from + "," + to + ") if errors occured " + getErrors());
          }
  
          if (from >= distances.length) {
              throw new IllegalStateException("Cannot get 'from' " + from + " from distances with size " + distances.length);
          } else if (to >= distances[from].length) {
              throw new IllegalStateException("Cannot get 'to' " + to + " from distances with size " + distances[from].length);
          }
          return distances[from][to];
      }