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 Summary

    Constructors
    Constructor Description
    DoubleBinarySearcher​(DoubleArray array)  
  • Method Summary

    Modifier and Type Method Description
    protected int compare​(int index)  
    protected double distance​(int index)  
    int search​(int from, int to, double searchFor)  

    Methods inherited from class org.elasticsearch.common.util.BinarySearcher

    search

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)