Interface ArrayOfDoublesSketchIterator


  • public interface ArrayOfDoublesSketchIterator
    Interface for iterating over tuple sketches of type ArrayOfDoubles
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long getKey()
      Gets a key from the current entry in the sketch, which is a hash of the original key passed to update().
      double[] getValues()
      Gets an array of values from the current entry in the sketch.
      boolean next()
      Advancing the iterator and checking existence of the next entry is combined here for efficiency.
    • Method Detail

      • next

        boolean next()
        Advancing the iterator and checking existence of the next entry is combined here for efficiency. This results in an undefined state of the iterator before the first call of this method.
        Returns:
        true if the next element exists
      • getKey

        long getKey()
        Gets a key from the current entry in the sketch, which is a hash of the original key passed to update(). The original keys are not retained. Don't call this before calling next() for the first time or after getting false from next().
        Returns:
        hash key from the current entry
      • getValues

        double[] getValues()
        Gets an array of values from the current entry in the sketch. Don't call this before calling next() for the first time or after getting false from next().
        Returns:
        array of double values for the current entry (may or may not be a copy)