code: public void update(final long n, final int k, final ArrayList<T> input) {
      ReservoirItemsSketch<T> ris = ReservoirItemsSketch.newInstance(input, n,
              ResizeFactor.X8, k); // forcing a resize factor
      ris = (ris.getK() <= maxK_ ? ris : ris.downsampledCopy(maxK_));
  
      if (gadget_ == null) {
        createNewGadget(ris, true);
      } else {
        twoWayMergeInternal(ris, true);
      }
    }
docs: Present this union with raw elements of a sketch. Useful when operating in a distributed
  environment like Pig Latin scripts, where an explicit SerDe may be overly complicated but
  keeping raw values is simple. Values are <em>not</em> copied and the input array may be
  modified.
  
  @param n Total items seen
  @param k Reservoir size
  @param input Reservoir samples