Class BigArrays.DoubleBinarySearcher

java.lang.Object
org.elasticsearch.common.util.BinarySearcher
org.elasticsearch.common.util.BigArrays.DoubleBinarySearcher
Enclosing class:
BigArrays

public static class BigArrays.DoubleBinarySearcher extends BinarySearcher
  • Constructor Details

    • DoubleBinarySearcher

      public DoubleBinarySearcher(DoubleArray array)
  • Method Details

    • compare

      protected int compare(int index)
      Specified by:
      compare in class BinarySearcher
      Returns:
      a negative integer, zero, or a positive integer if the array's value at index is less than, equal to, or greater than the value being searched for.
    • distance

      protected double distance(int index)
      Specified by:
      distance in class BinarySearcher
      Returns:
      the magnitude of the distance between the element at index and the value being searched for. It will usually be Math.abs(array[index] - searchValue).
    • search

      public int search(int from, int to, double searchFor)