Class HistoRanger

  • All Implemented Interfaces:
    Ranger

    public class HistoRanger
    extends java.lang.Object
    implements Ranger
    Histogram-capable Ranger implementation. Evenly sampled values from the input data stream are stored so that scaling based on the detailed distribution of the data, rather than just its minimum and maximum values, can be achieved.
    Since:
    21 Mar 2019
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      HistoRanger​(int nStore, int nQuantile)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean canScaleHistograms​(Span span)
      Indicates whether a given span can be used to scale histograms.
      Span createSpan()
      Returns an object characterising the range of data submitted so far.
      void submitDatum​(double d)
      Accepts a data value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HistoRanger

        public HistoRanger​(int nStore,
                           int nQuantile)
        Constructor. The number of samples collected and the number of quantiles can both be configured. The sample count defines the memory footprint of this object, which ought to be short lived, while the quantile count defines the memory footprint of any span objects created, which may be long-lived.
        Parameters:
        nStore - maximum number of samples to store
        nQuantile - maximum number of quantiles on which to base scaling
    • Method Detail

      • submitDatum

        public void submitDatum​(double d)
        Description copied from interface: Ranger
        Accepts a data value.
        Specified by:
        submitDatum in interface Ranger
        Parameters:
        d - datum
      • createSpan

        public Span createSpan()
        Description copied from interface: Ranger
        Returns an object characterising the range of data submitted so far. This should not be called while another thread might be calling Ranger.submitDatum(double).
        Specified by:
        createSpan in interface Ranger
        Returns:
        span of accumulated data