Class QuantileCombiner

java.lang.Object
uk.ac.starlink.ttools.plot2.layer.Combiner
uk.ac.starlink.ttools.plot2.layer.QuantileCombiner

@Equality public abstract class QuantileCombiner extends Combiner
Combiner implementation that accumulates all input points per pixel for custom combination by a user-supplied object. This kind of accumulation is likely to be very expensive on memory and probably CPU as well, but it's the only way in general to calculate quantities like the per-pixel median.
Since:
6 Nov 2015
Author:
Mark Taylor
  • Constructor Details

    • QuantileCombiner

      public QuantileCombiner(String name, String description, QuantileCombiner.Quantiler quantiler)
      Constructor.
      Parameters:
      name - combiner name
      description - combiner description
      quantiler - object to combine the actual submitted data values
  • Method Details

    • createArrayBinList

      public ArrayBinList createArrayBinList(int size)
      Description copied from class: Combiner
      May be able to create a bin list suitable for non-sparse, moderate-sized index ranges. If a combiner implementation is able to provide an ArrayBinList implementation that should be significantly more efficient than a HashBinList, this method should return it. If not, it can return null.
      Specified by:
      createArrayBinList in class Combiner
      Parameters:
      size - index range of required bin list
      Returns:
      array-based bin list, or null
    • createContainer

      public Combiner.Container createContainer()
      Description copied from class: Combiner
      Creates an object which can be used to accumulate values.

      Note: Since many container instances may by generated (when using a HashBinList) it is desirable to keep the returned objects as small as possible. In particular, it's a good idea to make the returned objects instances of a static class, to avoid an unncecessary reference to the owner object, unless there's a really compelling reason to do otherwise.

      Specified by:
      createContainer in class Combiner
      Returns:
      new container
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object