docs: @Override
    public void writeExternal(ObjectOutput out) throws IOException {
      super.writeExternal(out);
      int k_max = knnDistances.length;
      out.writeInt(k_max);
      for(int i = 0; i < k_max; i++) {
        out.writeDouble(knnDistances[i]);
      }
    }