Class Filter<T extends Summary>

java.lang.Object
org.apache.datasketches.tuple.Filter<T>
Type Parameters:
T - Summary type against which apply the Predicate

public class Filter<T extends Summary> extends Object
Class for filtering entries from a Sketch given a Summary
  • Constructor Details

    • Filter

      public Filter(Predicate<T> predicate)
      Filter constructor with a Predicate
      Parameters:
      predicate - Predicate to use in this filter. If the Predicate returns False, the element is discarded. If the Predicate returns True, then the element is kept in the Sketch
  • Method Details

    • filter

      public CompactSketch<T> filter(Sketch<T> sketchIn)
      Filters elements on the provided Sketch
      Parameters:
      sketchIn - The sketch against which apply the Predicate
      Returns:
      A new Sketch with some of the entries filtered out based on the Predicate