Class DiscretizedRangeEqual

java.lang.Object
io.deephaven.plot.datasets.histogram.DiscretizedRangeEqual
All Implemented Interfaces:
DiscretizedRange, Serializable

public class DiscretizedRangeEqual extends Object implements DiscretizedRange, Serializable
DiscretizedRange where all bins are equal length.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    DiscretizedRangeEqual(double min, double max, int nBins)
    Creates a DiscretizedRangeEqual instance with specified min and max with nBins equally sized bins.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    binMax(long index)
    Gets the max value of the bin at index.
    double
    binMin(long index)
    Gets the min value of the bin at index.
    long
    index(double value)
    Gets the index of the bin the value lies in.

    Methods inherited from class java.lang.Object

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

    • DiscretizedRangeEqual

      public DiscretizedRangeEqual(double min, double max, int nBins)
      Creates a DiscretizedRangeEqual instance with specified min and max with nBins equally sized bins.
      Parameters:
      min - minimum of the total range
      max - maximum of the total range
      nBins - number of bins
  • Method Details

    • binMin

      public double binMin(long index)
      Description copied from interface: DiscretizedRange
      Gets the min value of the bin at index.
      Specified by:
      binMin in interface DiscretizedRange
      Parameters:
      index - index
      Returns:
      min value of the bin specified by index
    • binMax

      public double binMax(long index)
      Description copied from interface: DiscretizedRange
      Gets the max value of the bin at index.
      Specified by:
      binMax in interface DiscretizedRange
      Parameters:
      index - index
      Returns:
      max value of the bin specified by index
    • index

      public long index(double value)
      Description copied from interface: DiscretizedRange
      Gets the index of the bin the value lies in.
      Specified by:
      index in interface DiscretizedRange
      Parameters:
      value - value
      Returns:
      max value of the bin specified by index